Skip to content
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

object_stacking fix #4394

Merged
merged 4 commits into from
Oct 27, 2017
Merged

Conversation

stefanhayden
Copy link
Member

when calling moveTo on an activeSelection the code should move the objects in the canvas._objects stack instead of moving the objects in the activeObject._objects stack. This already works correctly for moveForward / moveBack / ect.

…jects in the canvas._objects stack instead of moveing the objects in the activeObject._objects stack. This already works correctly for moveForward / moveBack / ect.
@asturur
Copy link
Member

asturur commented Oct 19, 2017

i agree with this fix.
Is there any change you can think of?

So the point of that code line before the group is to be able to reorder objects inside the group.

If i have a multi selection and want to reorder object inside there, i do not really care to do inside the active selection itself since their stack order is in the canvas.

If this change would not happen, i would reorder them in the active Selection stack getting 0 results in render and loosing the order as soon as the active selection is disbanded.

In case i m working with preserveObjectStacking = false, the active selection is rendered as an objet, so i would see the order swap but i would lost the effect as soon as it is disbanded.

I think is good.
Would you mind adding a UT?

@asturur
Copy link
Member

asturur commented Oct 27, 2017

after just 3 tries....

@asturur asturur merged commit 863eec4 into fabricjs:master Oct 27, 2017
@asturur asturur mentioned this pull request Nov 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants