mirror of
https://github.com/maputnik/editor.git
synced 2026-06-15 11:47:26 +00:00
Reactivate on change for background layer
This commit is contained in:
@@ -15,8 +15,7 @@ export default class BackgroundLayer extends React.Component {
|
||||
this.shouldComponentUpdate = PureRenderMixin.shouldComponentUpdate.bind(this);
|
||||
}
|
||||
|
||||
onPaintChanged(property, e) {
|
||||
let value = e.target.value
|
||||
onPaintChanged(property, value) {
|
||||
if (property == "background-opacity" && !isNaN(parseFloat(value))) {
|
||||
value = parseFloat(value)
|
||||
}
|
||||
@@ -25,8 +24,17 @@ export default class BackgroundLayer extends React.Component {
|
||||
|
||||
render() {
|
||||
return <div>
|
||||
<PropertyGroup layerType="background" groupType="layout" properties={this.props.layer.get('layout', Immutable.Map())}/>
|
||||
<PropertyGroup layerType="background" groupType="paint" properties={this.props.layer.get('paint', Immutable.Map())}/>
|
||||
<PropertyGroup
|
||||
layerType="background"
|
||||
groupType="layout"
|
||||
properties={this.props.layer.get('layout', Immutable.Map())}
|
||||
/>
|
||||
<PropertyGroup
|
||||
onChange={this.props.onPaintChanged.bind(this)}
|
||||
layerType="background"
|
||||
groupType="paint"
|
||||
properties={this.props.layer.get('paint', Immutable.Map())}
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
+11
-2
@@ -26,8 +26,17 @@ export default class FillLayer extends React.Component {
|
||||
|
||||
render() {
|
||||
return <div>
|
||||
<PropertyGroup layerType="fill" groupType="layout" properties={this.props.layer.get('layout', Immutable.Map())}/>
|
||||
<PropertyGroup layerType="fill" groupType="paint" properties={this.props.layer.get('paint', Immutable.Map())}/>
|
||||
<PropertyGroup
|
||||
layerType="fill"
|
||||
groupType="layout"
|
||||
properties={this.props.layer.get('layout', Immutable.Map())}
|
||||
/>
|
||||
<PropertyGroup
|
||||
onChange={this.props.onPaintChanged.bind(this)}
|
||||
layerType="fill"
|
||||
groupType="paint"
|
||||
properties={this.props.layer.get('paint', Immutable.Map())}
|
||||
/>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user