Skip to content

Commit

Permalink
wip: connection outlines
Browse files Browse the repository at this point in the history
  • Loading branch information
smbea committed Nov 9, 2023
1 parent eee0401 commit 1c2aac0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions assets/diagram-js.css
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,13 @@
stroke: var(--element-selected-outline-stroke-color);
}

.djs-connection.selected .djs-outline {
visibility: hidden;
}

.djs-multi-select .djs-element.selected .djs-outline {
stroke: var(--element-selected-outline-secondary-stroke-color);
visibility: visible;
}

.djs-shape.connect-ok .djs-visual > :nth-child(1) {
Expand Down
4 changes: 4 additions & 0 deletions lib/features/context-pad/ContextPad.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ import {
escapeCSS
} from '../../util/EscapeUtil';

import { isConnection } from '../../util/ModelUtil';


/**
* @typedef {import('../../model/Types').Element} Element
*
Expand Down Expand Up @@ -513,6 +516,7 @@ ContextPad.prototype.isShown = function() {
*/
ContextPad.prototype._getPosition = function(target) {

target = isConnection(target) ? target.waypoints[target.waypoints.length - 1] : target;
var elements = isArray(target) ? target : [ target ];
var bBox = getBBox(elements);

Expand Down

0 comments on commit 1c2aac0

Please sign in to comment.