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

discardActiveObject is not prevent moving of object #7953

Closed
vitonsky opened this issue May 20, 2022 · 8 comments · Fixed by #7954
Closed

discardActiveObject is not prevent moving of object #7953

vitonsky opened this issue May 20, 2022 · 8 comments · Fixed by #7954
Labels
stale Issue marked as stale by the stale bot

Comments

@vitonsky
Copy link
Contributor

When i start move object with mouse and call discardActiveObject, the active object are reset, but i still move object.
I can't stop moving object programmatically.

Version

5.0.0

Test Case

Browser: https://jsfiddle.net/aLuvj3hp/

Steps To Reproduce

  1. Start move red object
  2. Wait 3 second, to selection will reset

Expected Behavior

  • Active object are reseted
  • Moving of object are stopped

Actual Behavior

  • Active object are reseted
  • User still can move object
@ShaMan123
Copy link
Contributor

You are right.
We need to address this.
https://jsfiddle.net/yw9t7bu6/1/

@vitonsky
Copy link
Contributor Author

Thank you for temporary solution.

What you think about introduce method like stopTransformations instead of change behavior of discardActiveObject in new version?

At this time i have not cases when current behavior is necessary, but it's potentially useful.

Or we can add option to discardActiveObject.

@ShaMan123
Copy link
Contributor

I thought of that as well. But wasn't sure it's useful. Perhaps exposing stopTransformating is useful.
I think at this point I'm against adding an option to discardActiveObject. It is expected behavior.

@ShaMan123
Copy link
Contributor

ShaMan123 commented May 20, 2022

We can do that and have the dev listen to deselected event and call stopTransformating.
Perhaps that's more flexible but I wonder why would anyone want to keep transforming an object that isn't active... It's a potential bug.

@vitonsky
Copy link
Contributor Author

I agree that discardActiveObject by default mean "deselect all objects and stop its transforming". This is what i expect when call this method.

About cases when users may need to keep transforming i think about something like this:

  • participant selected 3 objects and start move it
  • one of its objects been locked by other participant in user application
  • user want to implement logic to locked objects will deselect, but want to keep transforming and by release object - rollback transformation

Developer want to keep transforming, to avoid confuse a user.

I think we should save the ability to deselect object, but to don't stop transforming. But we should think how to implement it and update documentation to clarify how it work

@ShaMan123
Copy link
Contributor

ShaMan123 commented May 20, 2022 via email

@stale
Copy link

stale bot commented Jun 12, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue marked as stale by the stale bot label Jun 12, 2022
@ShaMan123 ShaMan123 removed the stale Issue marked as stale by the stale bot label Jun 13, 2022
@stale
Copy link

stale bot commented Jun 29, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale Issue marked as stale by the stale bot label Jun 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Issue marked as stale by the stale bot
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants