mirror of
https://github.com/maputnik/editor.git
synced 2026-06-18 05:07:25 +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:
@@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
### 🐞 Bug fixes
|
### 🐞 Bug fixes
|
||||||
|
|
||||||
|
- Fixed the Expression editor (for long expressions) being able to be float under other components further down
|
||||||
- Fixed an issue when clicking on a popup and then clicking on the map again
|
- Fixed an issue when clicking on a popup and then clicking on the map again
|
||||||
- Fix modal close button possition
|
- Fix modal close button possition
|
||||||
- Fixed an issue with the generation of tranlations
|
- Fixed an issue with the generation of tranlations
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ import type { StylePropertySpecification } from "maplibre-gl";
|
|||||||
|
|
||||||
export type InputJsonProps = {
|
export type InputJsonProps = {
|
||||||
value: object
|
value: object
|
||||||
maxHeight?: number
|
|
||||||
className?: string
|
className?: string
|
||||||
onChange(object: object): void
|
onChange(object: object): void
|
||||||
onFocus?(...args: unknown[]): unknown
|
onFocus?(...args: unknown[]): unknown
|
||||||
@@ -115,16 +114,10 @@ class InputJsonInternal extends React.Component<InputJsonInternalProps, InputJso
|
|||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
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"}}>
|
return <div className="json-editor" data-wd-key="json-editor" aria-hidden="true" style={{cursor: "text"}}>
|
||||||
<div
|
<div
|
||||||
className={classnames("codemirror-container", this.props.className)}
|
className={classnames("codemirror-container", this.props.className)}
|
||||||
ref={(el) => {this._el = el;}}
|
ref={(el) => {this._el = el;}}
|
||||||
style={style}
|
|
||||||
/>
|
/>
|
||||||
</div>;
|
</div>;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,7 +84,6 @@ class ExpressionPropertyInternal extends React.Component<ExpressionPropertyInter
|
|||||||
onFocus={this.props.onFocus}
|
onFocus={this.props.onFocus}
|
||||||
onBlur={this.props.onBlur}
|
onBlur={this.props.onBlur}
|
||||||
value={value}
|
value={value}
|
||||||
maxHeight={200}
|
|
||||||
onChange={this.props.onChange}
|
onChange={this.props.onChange}
|
||||||
/>
|
/>
|
||||||
</Block>;
|
</Block>;
|
||||||
|
|||||||
@@ -260,7 +260,6 @@ class GeoJSONSourceFieldJsonEditor extends React.Component<GeoJSONSourceFieldJso
|
|||||||
<Block label={t("GeoJSON")} fieldSpec={latest.source_geojson.data}>
|
<Block label={t("GeoJSON")} fieldSpec={latest.source_geojson.data}>
|
||||||
<FieldJson
|
<FieldJson
|
||||||
value={this.props.source.data}
|
value={this.props.source.data}
|
||||||
maxHeight={200}
|
|
||||||
lintType="json"
|
lintType="json"
|
||||||
onChange={data => {
|
onChange={data => {
|
||||||
this.props.onChange({
|
this.props.onChange({
|
||||||
|
|||||||
Reference in New Issue
Block a user