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 moves forward after it's been moved #6630

Closed
woniesong92 opened this issue Oct 3, 2020 · 2 comments
Closed

Object moves forward after it's been moved #6630

woniesong92 opened this issue Oct 3, 2020 · 2 comments

Comments

@woniesong92
Copy link

woniesong92 commented Oct 3, 2020

Version

4.2.0

Steps to reproduce

  1. Add one Text element A
  2. Add another Text element B and bring it to the front
  3. Move Text element A so that it overlaps with Text element B
  4. Verify that Text element A is now more forward than text element B

Expected Behavior

Text element A stays behind Text element B after having been moved

Actual Behavior

Text element A is brought in front of Text element B after having been moved

Similar issues

@woniesong92
Copy link
Author

The exact behavior is actually the activeObject is at the forefront of the canvas. As a workaround, I could discard active object at the object:moved event.
I'm curious what's the rationale behind this default behavior. If there's a text element intersected on top of an image, the text element is hidden while the image is being moved. Is there any recommended way to get around this issue?

@asturur
Copy link
Member

asturur commented Oct 3, 2020

http://fabricjs.com/docs/fabric.Canvas.html#preserveObjectStacking

@asturur asturur closed this as completed Oct 3, 2020
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

No branches or pull requests

2 participants