Skip to content

Commit cf8e6a7

Browse files
[Maps] highlight combine layer background when creating layer group (#143909)
* [Maps] highlight combine layer background when creating layer group * tslint fixes * eslint fixes Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
1 parent c31c38c commit cf8e6a7

4 files changed

Lines changed: 15 additions & 0 deletions

File tree

x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/_layer_toc.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
cursor: alias !important;
77
}
88

9+
.mapLayerToc-droppable-isCombining {
10+
background-color: $euiColorEmptyShade !important;
11+
}
12+
913
.mapLayerToc-droppable-isDragging * {
1014
cursor: ns-resize !important;
1115
}

x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/layer_toc.tsx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,10 @@ export class LayerTOC extends Component<Props> {
244244
dragHandleProps={draggableProvided.dragHandleProps}
245245
isDragging={draggableSnapshot.isDragging}
246246
isDraggingOver={droppableSnapshot.isDraggingOver}
247+
isCombineLayer={
248+
this.state.combineLayer !== null &&
249+
this.state.combineLayer.getId() === layer.getId()
250+
}
247251
/>
248252
);
249253
}}

x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/_toc_entry.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@
6262
pointer-events: none !important;
6363
}
6464

65+
.mapTocEntry-isCombineLayer {
66+
transition: background-color $euiAnimSpeedExtraSlow ease;
67+
background-color: transparentize($euiColorSuccess, .75);
68+
}
69+
6570
.mapTocEntry-isSelected {
6671
background-color: tintOrShade($euiColorLightShade, 60%, 20%);
6772
}

x-pack/plugins/maps/public/connected_components/right_side_controls/layer_control/layer_toc/toc_entry/toc_entry.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export interface OwnProps {
4949
dragHandleProps?: DraggableProvidedDragHandleProps;
5050
isDragging?: boolean;
5151
isDraggingOver?: boolean;
52+
isCombineLayer?: boolean;
5253
}
5354

5455
type Props = ReduxStateProps & ReduxDispatchProps & OwnProps;
@@ -314,6 +315,7 @@ export class TOCEntry extends Component<Props, State> {
314315
const classes = classNames('mapTocEntry', {
315316
'mapTocEntry-isDragging': this.props.isDragging,
316317
'mapTocEntry-isDraggingOver': this.props.isDraggingOver,
318+
'mapTocEntry-isCombineLayer': this.props.isCombineLayer,
317319
'mapTocEntry-isSelected':
318320
this.props.layer.isPreviewLayer() ||
319321
(this.props.selectedLayer && this.props.selectedLayer.getId() === this.props.layer.getId()),

0 commit comments

Comments
 (0)