Skip to content

Commit

Permalink
[Maps] highlight combine layer background when creating layer group (#…
Browse files Browse the repository at this point in the history
…143909)

* [Maps] highlight combine layer background when creating layer group

* tslint fixes

* eslint fixes

Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
nreese and kibanamachine authored Oct 26, 2022
1 parent c31c38c commit cf8e6a7
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
cursor: alias !important;
}

.mapLayerToc-droppable-isCombining {
background-color: $euiColorEmptyShade !important;
}

.mapLayerToc-droppable-isDragging * {
cursor: ns-resize !important;
}
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@ export class LayerTOC extends Component<Props> {
dragHandleProps={draggableProvided.dragHandleProps}
isDragging={draggableSnapshot.isDragging}
isDraggingOver={droppableSnapshot.isDraggingOver}
isCombineLayer={
this.state.combineLayer !== null &&
this.state.combineLayer.getId() === layer.getId()
}
/>
);
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@
pointer-events: none !important;
}

.mapTocEntry-isCombineLayer {
transition: background-color $euiAnimSpeedExtraSlow ease;
background-color: transparentize($euiColorSuccess, .75);
}

.mapTocEntry-isSelected {
background-color: tintOrShade($euiColorLightShade, 60%, 20%);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export interface OwnProps {
dragHandleProps?: DraggableProvidedDragHandleProps;
isDragging?: boolean;
isDraggingOver?: boolean;
isCombineLayer?: boolean;
}

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

0 comments on commit cf8e6a7

Please sign in to comment.