diff --git a/lib/features/modeling/BpmnUpdater.js b/lib/features/modeling/BpmnUpdater.js index 2aa9c34b..ca402189 100644 --- a/lib/features/modeling/BpmnUpdater.js +++ b/lib/features/modeling/BpmnUpdater.js @@ -57,8 +57,8 @@ function BpmnUpdater(eventBus, bpmnFactory, connectionDocking) { self.updateBounds(e.context.shape); } - this.executed([ 'shape.move' ], updateBounds); - this.reverted([ 'shape.move' ], updateBounds); + this.executed([ 'shape.move', 'shape.create' ], updateBounds); + this.reverted([ 'shape.move', 'shape.create' ], updateBounds); // attach / detach connection @@ -108,7 +108,9 @@ BpmnUpdater.prototype.updateBounds = function(shape) { _.extend(bounds, { x: shape.x, - y: shape.y + y: shape.y, + width: shape.width, + height: shape.height }); }; diff --git a/test/spec/features/modeling/AppendShapeSpec.js b/test/spec/features/modeling/AppendShapeSpec.js index d32d7d19..63d3d8fd 100644 --- a/test/spec/features/modeling/AppendShapeSpec.js +++ b/test/spec/features/modeling/AppendShapeSpec.js @@ -58,6 +58,11 @@ describe('features/modeling - append shape', function() { // then expect(target.di).toBeDefined(); expect(target.di.$parent).toBe(startEvent.di.$parent); + + expect(target.di.bounds.x).toBe(targetShape.x); + expect(target.di.bounds.y).toBe(targetShape.y); + expect(target.di.bounds.width).toBe(targetShape.width); + expect(target.di.bounds.height).toBe(targetShape.height); }));