Skip to content

Commit

Permalink
fix(core): revert #584
Browse files Browse the repository at this point in the history
Closes #586
  • Loading branch information
nikku committed Nov 5, 2021
1 parent 8e09dfa commit 002d395
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 25 deletions.
5 changes: 1 addition & 4 deletions lib/core/Canvas.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,6 @@ function createGroup(parent, cls, childIndex) {
var BASE_LAYER = 'base';
var HIDDEN_MARKER = 'djs-element-hidden';

// render plane contents behind additional layers
var PLANE_LAYER_INDEX = -10;


var REQUIRED_MODEL_ATTRS = {
shape: [ 'x', 'y', 'width', 'height' ],
Expand Down Expand Up @@ -367,7 +364,7 @@ Canvas.prototype.createPlane = function(name, rootElement) {
};
}

var svgLayer = this.getLayer(name, PLANE_LAYER_INDEX);
var svgLayer = this.getLayer(name);
svgClasses(svgLayer).add(HIDDEN_MARKER);

var plane = this._planes[name] = {
Expand Down
21 changes: 0 additions & 21 deletions test/spec/core/CanvasSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -2263,27 +2263,6 @@ describe('Canvas', function() {
expect(plane.rootElement.isImplicit).to.be.true;
}));


it('should create layer with low priority', inject(function(canvas) {

// given
canvas.getLayer('foo');

// when
canvas.createPlane('A');
canvas.createPlane('B');

canvas.getLayer('bar');

// then
expectLayersOrder(canvas._viewport, [
'A',
'B',
'foo',
'bar'
]);
}));

});


Expand Down

0 comments on commit 002d395

Please sign in to comment.