parent
4b941bf7cc
commit
0393d51893
|
@ -155,6 +155,10 @@ ElementFactory.prototype._getDefaultSize = function(semantic) {
|
|||
return { width: 50, height: 50 };
|
||||
}
|
||||
|
||||
if (is(semantic, 'bpmn:TextAnnotation')) {
|
||||
return { width: 100, height: 30 };
|
||||
}
|
||||
|
||||
return { width: 100, height: 80 };
|
||||
};
|
||||
|
||||
|
|
|
@ -234,7 +234,7 @@ function BpmnSnapping(eventBus, canvas, bpmnRules, elementRegistry) {
|
|||
}
|
||||
|
||||
if (is(shape, 'bpmn:TextAnnotation')) {
|
||||
context.minDimensions = { width: 50, height: 50 };
|
||||
context.minDimensions = { width: 50, height: 30 };
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -85,9 +85,22 @@ describe('features/modeling - append text-annotation', function() {
|
|||
expect(connecting.$parent.id).to.equal('Transaction_2');
|
||||
}));
|
||||
|
||||
it('with right size', inject(function(elementRegistry, elementFactory, modeling) {
|
||||
|
||||
//given
|
||||
var eventShape = elementRegistry.get('IntermediateCatchEvent_1');
|
||||
|
||||
//when
|
||||
var annotationShape = modeling.appendShape(eventShape, { type: 'bpmn:TextAnnotation' });
|
||||
|
||||
//then
|
||||
expect(annotationShape.width).to.eql(100);
|
||||
expect(annotationShape.height).to.eql(30);
|
||||
}));
|
||||
});
|
||||
|
||||
|
||||
|
||||
describe('undo', function() {
|
||||
|
||||
it('should undo wire connection source + target', inject(function(elementRegistry, modeling, commandStack) {
|
||||
|
|
|
@ -35,7 +35,7 @@ describe('features/modeling - layout association', function() {
|
|||
|
||||
// then
|
||||
expect(waypoints).to.eql([
|
||||
{ original: { x: 400, y: 400 }, x: 370, y: 360 },
|
||||
{ original: { x: 400, y: 400 }, x: 389, y: 385 },
|
||||
{ original: { x: 191, y: 120 }, x: 202, y: 134 }
|
||||
]);
|
||||
|
||||
|
@ -57,7 +57,7 @@ describe('features/modeling - layout association', function() {
|
|||
|
||||
// then
|
||||
expect(waypoints).to.eql([
|
||||
{ original: { x: 420, y: 400 }, x: 387, y: 360 },
|
||||
{ original: { x: 420, y: 400 }, x: 408, y: 385 },
|
||||
{ original: { x: 191, y: 120 }, x: 202, y: 134 }
|
||||
]);
|
||||
|
||||
|
@ -85,7 +85,7 @@ describe('features/modeling - layout association', function() {
|
|||
|
||||
// then
|
||||
expect(waypoints).to.eql([
|
||||
{ original: { x: 420, y: 400 }, x: 412, y: 360 },
|
||||
{ original: { x: 420, y: 400 }, x: 417, y: 385 },
|
||||
{ x: 400, y: 300 },
|
||||
{ original: { x: 191, y: 120 }, x: 204, y: 131 }
|
||||
]);
|
||||
|
|
|
@ -416,7 +416,7 @@ describe('features/snapping - BpmnSnapping', function() {
|
|||
dragging.end();
|
||||
|
||||
expect(textAnnotation.width).to.equal(50);
|
||||
expect(textAnnotation.height).to.equal(50);
|
||||
expect(textAnnotation.height).to.equal(30);
|
||||
}));
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue