fix(internet-explorer): fix bugs due to internet explorer

This commit is contained in:
Philipp Fromme 2016-09-27 14:32:22 +02:00 committed by pedesen
parent c111bea876
commit 72c4687b35
3 changed files with 13 additions and 4 deletions

View File

@ -1373,7 +1373,13 @@ function BpmnRenderer(eventBus, styles, pathMap, priority) {
var textElement = renderExternalLabel(parentGfx, element);
var textBBox = textElement.getBBox();
var textBBox;
try {
textBBox = textElement.getBBox();
} catch (e) {
textBBox = { width: 0, height: 0, x: 0 };
}
// update element.x so that the layouted text is still
// center alligned (newX = oldMidX - newWidth / 2)

View File

@ -54,14 +54,14 @@
"karma-firefox-launcher": "^0.1.3",
"karma-ie-launcher": "^0.2.0",
"karma-mocha": "~0.1.0",
"karma-phantomjs-launcher": "^0.2.0",
"karma-phantomjs-launcher": "^1.0.2",
"karma-safari-launcher": "^0.1.1",
"karma-sinon-chai": "~0.3.0",
"karma-spec-reporter": "0.0.26",
"load-grunt-tasks": "^0.3.0",
"mocha": "^2.2.5",
"mocha-test-container-support": "0.2.0",
"phantomjs": "^2.1.7",
"phantomjs-prebuilt": "^2.1.12",
"sinon": "~1.14.1",
"sinon-chai": "~2.7.0",
"source-map-concat": "^1.0.0",
@ -80,6 +80,6 @@
"lodash": "^3.0.1",
"min-dom": "^0.2.0",
"object-refs": "^0.1.1",
"tiny-svg": "0.0.1"
"tiny-svg": "git://github.com/bpmn-io/tiny-svg.git#master"
}
}

View File

@ -50,6 +50,9 @@ describe('features - label-editing', function() {
// then
expect(directEditing.isActive()).to.be.true;
// clean up
directEditing._textbox.destroy();
}));