diagram-js
Advanced tools
Comparing version 12.7.3 to 12.8.0
@@ -26,2 +26,5 @@ import { | ||
import { isConnection } from '../../util/ModelUtil'; | ||
/** | ||
@@ -511,2 +514,8 @@ * @typedef {import('../../model/Types').Element} Element | ||
* | ||
* If target is a connection, the context pad will be placed according to the | ||
* connection's last waypoint. | ||
* | ||
* If multiple targets, the context pad will be placed according to the bounding | ||
* box containing all targets. | ||
* | ||
* @param {ContextPadTarget} target | ||
@@ -518,2 +527,4 @@ * | ||
target = isConnection(target) ? getLastWaypoint(target) : target; | ||
var elements = isArray(target) ? target : [ target ]; | ||
@@ -551,2 +562,6 @@ var bBox = getBBox(elements); | ||
return array.indexOf(item) !== -1; | ||
} | ||
function getLastWaypoint(connection) { | ||
return connection.waypoints[connection.waypoints.length - 1]; | ||
} |
{ | ||
"name": "diagram-js", | ||
"version": "12.7.3", | ||
"version": "12.8.0", | ||
"description": "A toolbox for displaying and modifying diagrams on the web", | ||
@@ -5,0 +5,0 @@ "main": "lib/Diagram.js", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
957885
33510