diff --git a/web/libs/editor/src/components/InteractiveOverlays/RelationsOverlay.jsx b/web/libs/editor/src/components/InteractiveOverlays/RelationsOverlay.jsx index 0c57c8f6a70e..431198f5b35b 100644 --- a/web/libs/editor/src/components/InteractiveOverlays/RelationsOverlay.jsx +++ b/web/libs/editor/src/components/InteractiveOverlays/RelationsOverlay.jsx @@ -8,6 +8,8 @@ import { FF_DEV_3391, isFF } from "../../utils/feature-flags"; import { isDefined } from "../../utils/utilities"; import NodesConnector from "./NodesConnector"; +import styles from "./RelationsOverlay.module.scss"; + const ArrowMarker = ({ id, color }) => { return ( relation.destroy(); }, []); if (start.width < 1 || start.height < 1 || end.width < 1 || end.height < 1) return null; + + const itemStyles = [styles.relationItem]; + if (highlight) { + itemStyles.push(styles._highlighted); + } + return ( - + {() => ( - + {this.state.shouldRender ? "Arrow Marker" : ""} {this.state.shouldRender && this.renderRelations(relations, visible, hasHighlight, highlighted)} + { + // moving a highlighted relation into the foreground + highlighted ? : null + } )} diff --git a/web/libs/editor/src/components/InteractiveOverlays/RelationsOverlay.module.scss b/web/libs/editor/src/components/InteractiveOverlays/RelationsOverlay.module.scss new file mode 100644 index 000000000000..7933c17ce14f --- /dev/null +++ b/web/libs/editor/src/components/InteractiveOverlays/RelationsOverlay.module.scss @@ -0,0 +1,15 @@ +.container { + .relationItem { + transition: opacity 300ms; + } + + &._highlighting { + & .relationItem { + opacity: 0.2; + + &._highlighted { + opacity: 1; + } + } + } +}