Comparing version 0.10.2 to 0.10.3
@@ -80,5 +80,6 @@ 'use strict'; | ||
var top = padRect.top - diagramRect.top; | ||
var left = padRect.left - diagramRect.left; | ||
var pos = { | ||
x: padRect.left, | ||
x: left, | ||
y: top + padRect.height + Y_OFFSET | ||
@@ -85,0 +86,0 @@ }; |
{ | ||
"name": "bpmn-js", | ||
"version": "0.10.2", | ||
"version": "0.10.3", | ||
"description": "A bpmn 2.0 toolkit and web modeler", | ||
@@ -58,4 +58,4 @@ "scripts": { | ||
"dependencies": { | ||
"bpmn-moddle": "^0.8.0", | ||
"diagram-js": "^0.10.1", | ||
"bpmn-moddle": "^0.8.3", | ||
"diagram-js": "^0.10.2", | ||
"diagram-js-direct-editing": "^0.10.0", | ||
@@ -62,0 +62,0 @@ "didi": "^0.0.4", |
@@ -31,2 +31,40 @@ 'use strict'; | ||
}); | ||
describe('should show chooser/replace menu in the correct position ', function() { | ||
var container; | ||
beforeEach(function() { | ||
container = jasmine.getEnv().getTestContainer(); | ||
}); | ||
it('for a diagram element', inject(function(elementRegistry, eventBus, contextPad, popupMenu) { | ||
// given | ||
var bpmnContainer = container.firstChild, | ||
element = elementRegistry.get('StartEvent_1'), | ||
padding = 5, | ||
replaceMenuRect, | ||
padMenuRect; | ||
bpmnContainer.style.marginLeft = '200px'; | ||
bpmnContainer.style.marginTop = '200px'; | ||
// when | ||
eventBus.on('contextPad.open', function(event) { | ||
event.current.entries.replace.action.click(null, element); | ||
replaceMenuRect = popupMenu._instances['replace-menu']._container.getBoundingClientRect(); | ||
padMenuRect = contextPad.getPad(element).html.getBoundingClientRect(); | ||
}); | ||
eventBus.fire('element.click', { element: element }); | ||
// then | ||
expect(replaceMenuRect.left).not.toBeGreaterThan(padMenuRect.left); | ||
expect(replaceMenuRect.top).not.toBeGreaterThan(padMenuRect.bottom + padding); | ||
})); | ||
}); | ||
}); |
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
1325286
200
10856
Updatedbpmn-moddle@^0.8.3
Updateddiagram-js@^0.10.2