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

diagram-js

Package Overview
Dependencies
Maintainers
8
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 14.5.2 to 14.5.3

44

lib/features/context-pad/ContextPad.js

@@ -23,2 +23,6 @@ import {

var MARKERS_HIDDEN = [
'djs-element-hidden',
'djs-label-hidden'
];

@@ -136,7 +140,9 @@ /**

this._eventBus.on('canvas.viewbox.changed', () => {
if (this.isOpen()) {
this._updatePosition();
}
this._updatePosition();
});
this._eventBus.on('element.marker.update', function(event) {
self._updateVisibility();
});
this._container = this._createContainer();

@@ -390,2 +396,4 @@ };

this._updateVisibility();
this._eventBus.fire('contextPad.open', { current: this._current });

@@ -532,2 +540,4 @@ };

this._updatePosition();
this._eventBus.fire('contextPad.show', { current: this._current });

@@ -618,2 +628,30 @@ };

/**
* Update context pad visibility. Hide if any of the target elements is hidden
* using the `djs-element-hidden` or `djs-label-hidden` markers.
*/
ContextPad.prototype._updateVisibility = function() {
if (!this.isOpen()) {
return;
}
var self = this;
var target = this._current.target;
var targets = isArray(target) ? target : [ target ];
var isHidden = targets.some(function(target) {
return MARKERS_HIDDEN.some(function(marker) {
return self._canvas.hasMarker(target, marker);
});
});
if (isHidden) {
self.hide();
} else {
self.show();
}
};
/**
* Get bounding client rect of target element(s).

@@ -620,0 +658,0 @@ *

2

package.json
{
"name": "diagram-js",
"version": "14.5.2",
"version": "14.5.3",
"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