-
Notifications
You must be signed in to change notification settings - Fork 420
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(core): ensure base layer has index 0 #585
Conversation
lib/features/resize/ResizeHandles.js
Outdated
@@ -172,7 +174,7 @@ ResizeHandles.prototype.removeResizers = function() { | |||
}; | |||
|
|||
ResizeHandles.prototype._getResizersParent = function() { | |||
return this._canvas.getLayer('resizers'); | |||
return this._canvas.getLayer('resizers', LAYER_INDEX); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like that change as it essentially means all special layers must explicitly render on top of the base layer.
What about the following:
- if no priority is given, layers render with priority 1
- base layers + plane layers render with the priority of
0
Please keep the canvas spec around. We should aim to fix this as part of our core.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like that change as it essentially means all special layers must explicitly render on top of the base layer.
This means: Breaking change for everyone who created layers in the past, bpmn-js, some extension we don't yet know about...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, we don't want a major release for this 👍
lib/features/resize/ResizeHandles.js
Outdated
@@ -172,7 +174,7 @@ ResizeHandles.prototype.removeResizers = function() { | |||
}; | |||
|
|||
ResizeHandles.prototype._getResizersParent = function() { | |||
return this._canvas.getLayer('resizers'); | |||
return this._canvas.getLayer('resizers', LAYER_INDEX); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like that change as it essentially means all special layers must explicitly render on top of the base layer.
This means: Breaking change for everyone who created layers in the past, bpmn-js, some extension we don't yet know about...
812d913
to
40ca9f5
Compare
Reverted the original bug (002d395) which gives us time to investigate this one in an orderly manner. |
40ca9f5
to
149ccb7
Compare
149ccb7
to
866dd8b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nicely done.
Thanks for adding the additional tests that cover the layering behavior (base vs. utility layers) 👏 🏅.
I've also double checked it against bpmn-js@latest and can confirm bpmn-io/bpmn-js#1520 is fixed and other things continue to work, too. |
This reverts commit 058731b and uses a positive index to place resize layers infront of rendered content
Why we need to revert:
Instead of lowering the index of planes, we should use the existing API to ensure our utility planes are rendered with priority