Sending objects forward and backward in layers #10133
Unanswered
SupremeDeity
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I m not sure what this BringObjectForward with intersecting should work, if it doesn't you should get a working reproduction issue and open an issue. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So im trying to send objects forwards and backwards, so they render below or top of other objects, programatically. I have seen quite a bit of issues with this.
If i use
canvas.bringObjectForward(obj);
, i have to press the button quite a bit of times before the item actually comes up. IIRC, using true to intersection does not do anything either. There is some change but i do not know what, because it looks like the stroke gets a bit sharper, but i assume thats just it being re-rendered or something with Proxy(). My shapes are a bit blurry right now and doing zoom in zoom out can do something similar.Bringing the object to front adds a
Proxy()
wrapper to the object. Sending it to the back again, removes this wrapper:Cannot send objects to the back at all unless the other object is wrapped with this
Proxy()
, basically i need to influence the object withbringObjectForward
Couldn't find the condition for this but with one of the functions, iirc the ToFront and ToBack variants were cloning the object or something, with one of them on top and the other in the same layer in the stack.
This is breaking my history functionality too because structuredClone isnt working with the window property or something. Additional bit of context here. The object being sent to these functions and the output you are seeing in the screenshot all are taken from
getActiveObjects()
. These are custom shapes (subclassed). This is how the_render
function goes:Beta Was this translation helpful? Give feedback.
All reactions