chore(project): migrate to diagram-js@0.31

This commit is contained in:
Nico Rehwaldt 2018-04-02 11:13:39 +02:00
parent 0f04b76ad2
commit 7a3b92c094
3 changed files with 44 additions and 30 deletions

44
package-lock.json generated
View File

@ -1852,24 +1852,42 @@
"dev": true "dev": true
}, },
"diagram-js": { "diagram-js": {
"version": "0.30.0", "version": "0.31.0",
"resolved": "https://registry.npmjs.org/diagram-js/-/diagram-js-0.30.0.tgz", "resolved": "https://registry.npmjs.org/diagram-js/-/diagram-js-0.31.0.tgz",
"integrity": "sha512-JpWHv6Cb3QxmOzVod3uG7KJfGfIjmqlVkHgbA5xubII7Nj2wHat3SjVFT8ty1mWn+ZWYUAFoYnrgvsbFRDu1LA==", "integrity": "sha512-oUaU6mfQBcTh9tApI03I6n+9JRNLJkI6qinH0aBob8oHfrdB+s6haMIE6Q2lrN49tgiLAYa7lBFIjShYwmMy+g==",
"requires": { "requires": {
"didi": "3.0.0", "didi": "3.2.0",
"hammerjs": "2.0.8", "hammerjs": "2.0.8",
"inherits": "2.0.3", "inherits": "2.0.3",
"min-dash": "2.3.0", "min-dash": "2.4.0",
"min-dom": "2.0.1", "min-dom": "2.2.0",
"object-refs": "0.1.1", "object-refs": "0.1.1",
"path-intersection": "1.0.2", "path-intersection": "1.0.2",
"tiny-svg": "1.0.2" "tiny-svg": "1.1.0"
}, },
"dependencies": { "dependencies": {
"min-dash": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/min-dash/-/min-dash-2.4.0.tgz",
"integrity": "sha512-jmMFOBAd/TJP8IdSzLh7rmNqZEOufp8u10AYMCAQJ+MK1xnHAHQi6aF0DoyOU3oJwIRKKpMKO9nPx4dSf27Wng=="
},
"min-dom": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/min-dom/-/min-dom-2.2.0.tgz",
"integrity": "sha512-kasYrY7+swALVEl/KLWlxNvtdImd2akUbBHuD0Q/7bLcmEQ2MxUVAv/x8yNYwFTp6w6bZkhx03TBv+41gzxmkg==",
"requires": {
"closest": "0.0.1",
"component-event": "0.1.4",
"delegate-events": "1.1.1",
"domify": "1.4.0",
"indexof": "0.0.1",
"matches-selector": "1.2.0"
}
},
"tiny-svg": { "tiny-svg": {
"version": "1.0.2", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/tiny-svg/-/tiny-svg-1.0.2.tgz", "resolved": "https://registry.npmjs.org/tiny-svg/-/tiny-svg-1.1.0.tgz",
"integrity": "sha512-ot7zogQRbMcTJELZiLr6Lo19St4WMoAduFuYHquo8x3LR20OU50Ip2L37fD7y23xaIVOyFcrr1pgJJKRBJUpnQ==" "integrity": "sha512-4Qnoua0updWaa5HBmPUohDzKgXmsu9Cl+l/o0R1fZBvuywKPaC6I1PUBwLC8iV+EaQkXJObTL+QkPBDDelnZIg=="
} }
} }
}, },
@ -1883,9 +1901,9 @@
} }
}, },
"didi": { "didi": {
"version": "3.0.0", "version": "3.2.0",
"resolved": "https://registry.npmjs.org/didi/-/didi-3.0.0.tgz", "resolved": "https://registry.npmjs.org/didi/-/didi-3.2.0.tgz",
"integrity": "sha512-fDnQmmSpLBxeJtM0zn/qZ5Ti3etuBvVye2/fGI38VkcdWPpH2pDxwk8cVusXZIyhLhihHNo/Kcx1oNbcqV5pkA==" "integrity": "sha512-D59Ql6JPQITwjObDhqb20SL1QE6rs6VfBh+G+Oxh4Wfuz20mmfL1mfC80nIEgS08iyPifbCs1W6A3yYZJSBLkw=="
}, },
"diff": { "diff": {
"version": "3.3.1", "version": "3.3.1",

View File

@ -77,7 +77,7 @@
"dependencies": { "dependencies": {
"bpmn-font": "^0.8.0", "bpmn-font": "^0.8.0",
"bpmn-moddle": "^3.0.2", "bpmn-moddle": "^3.0.2",
"diagram-js": "^0.30.0", "diagram-js": "^0.31.0",
"diagram-js-direct-editing": "^0.23.0", "diagram-js-direct-editing": "^0.23.0",
"ids": "^0.2.0", "ids": "^0.2.0",
"inherits": "^2.0.1", "inherits": "^2.0.1",

View File

@ -2,8 +2,6 @@
var assign = require('min-dash').assign; var assign = require('min-dash').assign;
var EventBus = require('diagram-js/lib/core/EventBus');
var TestHelper = require('../TestHelper'); var TestHelper = require('../TestHelper');
@ -39,21 +37,19 @@ module.exports.createCanvasEvent = createCanvasEvent;
function createEvent(target, position, data) { function createEvent(target, position, data) {
data = assign({ return TestHelper.getBpmnJS().invoke(function(eventBus) {
target: target, data = assign({
x: position.x, target: target,
y: position.y, x: position.x,
clientX: position.x, y: position.y,
clientY: position.y, clientX: position.x,
offsetX: position.x, clientY: position.y,
offsetY: position.y offsetX: position.x,
}, data || {}); offsetY: position.y
}, data || {});
var event = new EventBus.Event(); return eventBus.createEvent(data);
});
event.init(data);
return event;
} }
module.exports.createEvent = createEvent; module.exports.createEvent = createEvent;