From deec7894dd46558d9b376af1bcf306f927bd87ca Mon Sep 17 00:00:00 2001 From: orangemug Date: Thu, 1 Nov 2018 08:12:40 +0000 Subject: [PATCH] Make the whole layer label draggable --- src/components/layers/LayerListItem.jsx | 28 ++++++---------- src/styles/_layer.scss | 43 +++++++++---------------- 2 files changed, 25 insertions(+), 46 deletions(-) diff --git a/src/components/layers/LayerListItem.jsx b/src/components/layers/LayerListItem.jsx index 88834eb6..fa0fc452 100644 --- a/src/components/layers/LayerListItem.jsx +++ b/src/components/layers/LayerListItem.jsx @@ -7,23 +7,16 @@ import {MdMenu, MdContentCopy, MdVisibility, MdVisibilityOff, MdDelete} from 're import LayerIcon from '../icons/LayerIcon' import {SortableElement, SortableHandle} from 'react-sortable-hoc' -class LayerTypeDragHandle extends React.Component { - static propTypes = LayerIcon.propTypes - render() { - return
-
- -
- -
- } -} - -const LayerTypeDragHandleSortable = SortableHandle((props) => ) +const DraggableLabel = SortableHandle((props) => { + return
+ + {props.layerId} +
+}); class IconAction extends React.Component { static propTypes = { @@ -111,8 +104,7 @@ class LayerListItem extends React.Component { "maputnik-layer-list-item-selected": this.props.isSelected, [this.props.className]: true, })}> - - {this.props.layerId} +