Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

diagram-js

Package Overview
Dependencies
Maintainers
10
Versions
287
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

diagram-js - npm Package Compare versions

Comparing version 12.7.0 to 12.7.1

10

lib/features/outline/Outline.d.ts

@@ -28,4 +28,14 @@ /**

/**
* Updates the outline of a connection respecting the bounding box of
* the connection and an outline offset.
* Register an outline provider with the given priority.
*
* @param outline
* @param connection
**/
updateConnectionOutline(outline: SVGElement, connection: Element): void;
/**
* Register an outline provider with the given priority.
*
* @param priority

@@ -32,0 +42,0 @@ * @param provider

@@ -0,1 +1,3 @@

import { getBBox } from '../../util/Elements';
var LOW_PRIORITY = 500;

@@ -78,2 +80,15 @@

eventBus.on([ 'connection.added', 'connection.changed' ], function(event) {
var element = event.element,
gfx = event.gfx;
var outline = domQuery('.djs-outline', gfx);
if (!outline) {
outline = createOutline(gfx, element);
svgAppend(gfx, outline);
}
self.updateConnectionOutline(outline, element);
});
}

@@ -111,4 +126,23 @@

/**
* Updates the outline of a connection respecting the bounding box of
* the connection and an outline offset.
* Register an outline provider with the given priority.
*
* @param {SVGElement} outline
* @param {Element} connection
**/
Outline.prototype.updateConnectionOutline = function(outline, connection) {
var bbox = getBBox(connection);
svgAttr(outline, {
x: bbox.x - this.offset,
y: bbox.y - this.offset,
width: bbox.width + this.offset * 2,
height: bbox.height + this.offset * 2
});
};
/**
* Register an outline provider with the given priority.
*
* @param {number} priority

@@ -115,0 +149,0 @@ * @param {OutlineProvider} provider

2

package.json
{
"name": "diagram-js",
"version": "12.7.0",
"version": "12.7.1",
"description": "A toolbox for displaying and modifying diagrams on the web",

@@ -5,0 +5,0 @@ "main": "lib/Diagram.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc