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

diagram-js

Package Overview
Dependencies
Maintainers
2
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 0.5.0 to 0.5.1

3

lib/util/Text.js

@@ -85,2 +85,5 @@ 'use strict';

var fakeText = parent.text(0, 0, '').attr(style).node;
// FF regression: ensure text is shown during rendering
// by attaching it directly to the body
fakeText.ownerSVGElement.appendChild(fakeText);

@@ -87,0 +90,0 @@ /**

2

package.json
{
"name": "diagram-js",
"version": "0.5.0",
"version": "0.5.1",
"description": "A modeling framework for the web",

@@ -5,0 +5,0 @@ "scripts": {

@@ -76,2 +76,20 @@ 'use strict';

it('should create text on hidden element', function() {
// given
var label = 'I am a label';
// render on invisible element
container.attr('display', 'none');
// when
var text = createText(container, label, { box: { width: 150, height: 100 }});
// make visible (for bounds check)
container.attr('display', '');
expect(text).toBeDefined();
expect(text).toFitBBox({ x: 35, y: 0, width: 80, height: 30 });
});
describe('should line break', function() {

@@ -78,0 +96,0 @@

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