-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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 render preserve #2120
Fix render preserve #2120
Conversation
Update to master
@@ -748,6 +748,9 @@ | |||
* @param {Boolean} fromLeft When true, context is transformed to object's top/left corner. This is used when rendering text on Node | |||
*/ | |||
transform: function(ctx, fromLeft) { | |||
if (this.group && this.canvas.preserveObjectStacking && this.group === this.canvas._activeGroup) { |
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.
This is breaking for me right now because this.cavas doesn't seem to be defined, which is odd because all groups should have a canvas.
Edit: Wait, shouldn't this be this.group.canvas
, and not this.canvas
?
@asturur thanks for the quick fix, there is just a little mistake that I have mentioned as a line note. Also, I'm sure you see this already, but there is a code style failure (trailing whitespace). |
can you show me how you get this.canvas undefined? not getting it. |
@asturur just emailed you back, but if anyone else is wondering, its because objects inside a group don't have access to this.canvas, but they can get it through this.group.canvas. Maybe this is a separate issue. |
No is just demostration that this fix is not 100% safe. |
Ok i see in master is already working... thanks anyway ...;) |
This fix make active group render ok with preserveObjectStacking.
Otherwise we should revert #2083.
It sound more reasonable to keep the render as it is and add this fix, expecially for big pathgroup of complex SVGs.