mirror of
https://github.com/maputnik/editor.git
synced 2025-12-24 15:10:01 +00:00
fix: remove broken max width from Expression properties (#1455)
Before vs after should be self-explanatory what motivated me to remove the max-width. <img width="1353" height="762" alt="image" src="https://github.com/user-attachments/assets/eda0ce6c-5187-4496-bc92-6f91d1aaa5ee" /> Resolves https://github.com/maplibre/maputnik/issues/1445 --------- Co-authored-by: Harel M <harel.mazor@gmail.com>
This commit is contained in:
@@ -10,7 +10,6 @@ import type { StylePropertySpecification } from "maplibre-gl";
|
||||
|
||||
export type InputJsonProps = {
|
||||
value: object
|
||||
maxHeight?: number
|
||||
className?: string
|
||||
onChange(object: object): void
|
||||
onFocus?(...args: unknown[]): unknown
|
||||
@@ -115,16 +114,10 @@ class InputJsonInternal extends React.Component<InputJsonInternalProps, InputJso
|
||||
};
|
||||
|
||||
render() {
|
||||
const style = {} as {maxHeight?: number};
|
||||
if (this.props.maxHeight) {
|
||||
style.maxHeight = this.props.maxHeight;
|
||||
}
|
||||
|
||||
return <div className="json-editor" data-wd-key="json-editor" aria-hidden="true" style={{cursor: "text"}}>
|
||||
<div
|
||||
className={classnames("codemirror-container", this.props.className)}
|
||||
ref={(el) => {this._el = el;}}
|
||||
style={style}
|
||||
/>
|
||||
</div>;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,6 @@ class ExpressionPropertyInternal extends React.Component<ExpressionPropertyInter
|
||||
onFocus={this.props.onFocus}
|
||||
onBlur={this.props.onBlur}
|
||||
value={value}
|
||||
maxHeight={200}
|
||||
onChange={this.props.onChange}
|
||||
/>
|
||||
</Block>;
|
||||
|
||||
@@ -260,7 +260,6 @@ class GeoJSONSourceFieldJsonEditor extends React.Component<GeoJSONSourceFieldJso
|
||||
<Block label={t("GeoJSON")} fieldSpec={latest.source_geojson.data}>
|
||||
<FieldJson
|
||||
value={this.props.source.data}
|
||||
maxHeight={200}
|
||||
lintType="json"
|
||||
onChange={data => {
|
||||
this.props.onChange({
|
||||
|
||||
Reference in New Issue
Block a user