diagram-js
Advanced tools
Comparing version 0.5.0 to 0.5.1
@@ -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 @@ /** |
{ | ||
"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 @@ |
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
338400
9955