diff --git a/src/components/AppLayout.jsx b/src/components/AppLayout.jsx index 90224526..3d08ed6c 100644 --- a/src/components/AppLayout.jsx +++ b/src/components/AppLayout.jsx @@ -25,51 +25,20 @@ class AppLayout extends React.Component { } render() { - return
+ return
{this.props.toolbar} -
+
{this.props.layerList}
-
+
{this.props.layerEditor}
{this.props.map} - {this.props.bottom &&
+ {this.props.bottom &&
{this.props.bottom}
} diff --git a/src/components/Button.jsx b/src/components/Button.jsx index 0b94046e..a7892060 100644 --- a/src/components/Button.jsx +++ b/src/components/Button.jsx @@ -11,17 +11,8 @@ class Button extends React.Component { render() { return + className="maputnik-button" + style={this.props.style}> {this.props.children} } diff --git a/src/components/ScrollContainer.jsx b/src/components/ScrollContainer.jsx index 017f768b..7425300d 100644 --- a/src/components/ScrollContainer.jsx +++ b/src/components/ScrollContainer.jsx @@ -1,15 +1,7 @@ import React from 'react' const ScrollContainer = (props) => { - return
+ return
{props.children}
} diff --git a/src/components/Toolbar.jsx b/src/components/Toolbar.jsx index 288c6cce..1efa4a8e 100644 --- a/src/components/Toolbar.jsx +++ b/src/components/Toolbar.jsx @@ -30,22 +30,14 @@ const IconText = props => {props.children} -const actionStyle = { - display: "inline-block", - padding: 10, - fontSize: fontSizes[4], - cursor: "pointer", - color: colors.white, - textDecoration: 'none', -} - const ToolbarLink = props => + }} + > {props.children} @@ -54,20 +46,12 @@ class ToolbarAction extends React.Component { onClick: React.PropTypes.func.isRequired, } - constructor(props) { - super(props) - this.state = { hover: false } - } - render() { return this.setState({hover: true})} - onMouseOut={e => this.setState({hover: false})} style={{ - ...actionStyle, ...this.props.style, - backgroundColor: this.state.hover ? colors.gray : null, }}> {this.props.children} @@ -116,15 +100,7 @@ export default class Toolbar extends React.Component { } render() { - return
+ return
@@ -69,6 +70,7 @@ class ColorField extends React.Component { onChange={c => this.props.onChange(formatColor(c))} />
- return
+ return
{this.state.pickerOpened && picker} this.setState({showDoc: true})} onMouseOut={e => this.setState({showDoc: false})} + className="maputnik-doc-target" style={{ cursor: 'help', ...this.props.cursorTargetStyle, @@ -48,7 +47,9 @@ export default class DocLabel extends React.Component { width: 120, display: this.state.showDoc ? null : 'none', zIndex: 3, - }}> + }} + className="maputnik-doc-popup" + > {this.props.doc}
diff --git a/src/components/fields/PropertyGroup.jsx b/src/components/fields/PropertyGroup.jsx index 90b7b33e..415c4dae 100644 --- a/src/components/fields/PropertyGroup.jsx +++ b/src/components/fields/PropertyGroup.jsx @@ -66,7 +66,7 @@ export default class PropertyGroup extends React.Component { /> }) - return
+ return
{fields}
} diff --git a/src/components/fields/ZoomSpecField.jsx b/src/components/fields/ZoomSpecField.jsx index 8205b452..2fe6ea86 100644 --- a/src/components/fields/ZoomSpecField.jsx +++ b/src/components/fields/ZoomSpecField.jsx @@ -105,6 +105,7 @@ export default class ZoomSpecField extends React.Component { if(idx === 1) { label =
-
+
{this.props.children}
diff --git a/src/components/filter/SingleFilterEditor.jsx b/src/components/filter/SingleFilterEditor.jsx index bac01fec..94c32442 100644 --- a/src/components/filter/SingleFilterEditor.jsx +++ b/src/components/filter/SingleFilterEditor.jsx @@ -29,36 +29,32 @@ class SingleFilterEditor extends React.Component { const propertyName = f[1] const filterArgs = f.slice(2) - return
- [propName, propName])} - onChange={newPropertyName => this.onFilterPartChanged(filterOp, newPropertyName, filterArgs)} - /> - this.onFilterPartChanged(newFilterOp, propertyName, filterArgs)} - options={otherFilterOps} - /> - this.onFilterPartChanged(filterOp, propertyName, v.split(','))} - /> +
+ [propName, propName])} + onChange={newPropertyName => this.onFilterPartChanged(filterOp, newPropertyName, filterArgs)} + /> +
+
+ this.onFilterPartChanged(newFilterOp, propertyName, filterArgs)} + options={otherFilterOps} + /> +
+
+ this.onFilterPartChanged(filterOp, propertyName, v.split(','))} + /> +
} diff --git a/src/components/inputs/ArrayInput.jsx b/src/components/inputs/ArrayInput.jsx index 93ca7ea6..45f6b86e 100644 --- a/src/components/inputs/ArrayInput.jsx +++ b/src/components/inputs/ArrayInput.jsx @@ -50,7 +50,8 @@ class ArrayInput extends React.Component { } }) - return
+ return
{inputs}
} diff --git a/src/components/inputs/AutocompleteInput.jsx b/src/components/inputs/AutocompleteInput.jsx index 9077de84..77d0dc00 100644 --- a/src/components/inputs/AutocompleteInput.jsx +++ b/src/components/inputs/AutocompleteInput.jsx @@ -20,6 +20,7 @@ class AutocompleteInput extends React.Component { render() { return + }} + className="maputnik-input-block" + > {this.props.doc && + }} + className="maputnik-multibutton" + > {buttons}
} diff --git a/src/components/inputs/NumberInput.jsx b/src/components/inputs/NumberInput.jsx index e3cadd83..b038b98a 100644 --- a/src/components/inputs/NumberInput.jsx +++ b/src/components/inputs/NumberInput.jsx @@ -68,8 +68,8 @@ class NumberInput extends React.Component { render() { return }) - return
+ return
{groups}
} diff --git a/src/components/layers/LayerEditorGroup.jsx b/src/components/layers/LayerEditorGroup.jsx index d0a550f3..b5a033d9 100644 --- a/src/components/layers/LayerEditorGroup.jsx +++ b/src/components/layers/LayerEditorGroup.jsx @@ -36,18 +36,7 @@ export default class LayerEditorGroup extends React.Component { render() { return
-
this.setState({hover: true})} onMouseOut={e => this.setState({hover: false})} onClick={e => this.props.onActiveToggle(!this.props.isActive)} diff --git a/src/components/layers/LayerList.jsx b/src/components/layers/LayerList.jsx index fa1b116d..dd8b85f4 100644 --- a/src/components/layers/LayerList.jsx +++ b/src/components/layers/LayerList.jsx @@ -69,11 +69,7 @@ class LayerListContainer extends React.Component { onLayerVisibilityToggle={this.onLayerVisibilityToggle.bind(this)} /> }) - return
} } diff --git a/src/components/modals/Modal.jsx b/src/components/modals/Modal.jsx index 4d82b8ae..6061d75f 100644 --- a/src/components/modals/Modal.jsx +++ b/src/components/modals/Modal.jsx @@ -15,32 +15,17 @@ class Modal extends React.Component { render() { return -
-
- {this.props.title} + } diff --git a/src/components/modals/SourcesModal.jsx b/src/components/modals/SourcesModal.jsx index a4a54fbc..b7aa89f2 100644 --- a/src/components/modals/SourcesModal.jsx +++ b/src/components/modals/SourcesModal.jsx @@ -27,7 +27,7 @@ class PublicSource extends React.Component { } render() { - return
-