diff --git a/src/components/fields/ZoomSpecField.jsx b/src/components/fields/ZoomSpecField.jsx index 42883c0b..44686dc1 100644 --- a/src/components/fields/ZoomSpecField.jsx +++ b/src/components/fields/ZoomSpecField.jsx @@ -261,13 +261,11 @@ export default class ZoomSpecProperty extends React.Component { } renderProperty() { - let functionBtn = null - if(this.props.fieldSpec['zoom-function']) { - functionBtn = - } + const functionBtn = return - @@ -307,17 +306,24 @@ function MakeFunctionButtons(props) { doc={"Turn property into a zoom function to enable a map feature to change with map's zoom level."} /> - - } - cursorTargetStyle={{ cursor: 'pointer' }} - doc={"Turn property into a data function to enable a map feature to change according to data properties and the map's zoom level."} - /> - - + + if (props.fieldSpec['property-function']) { + makeDataButton = + } + cursorTargetStyle={{ cursor: 'pointer' }} + doc={"Turn property into a data function to enable a map feature to change according to data properties and the map's zoom level."} + /> + + } + return {makeZoomButton}{makeDataButton} + } + else { + return null + } } function DeleteStopButton(props) {