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

can support 【set transformMatrix(Matrix4 value)】 for Transform2D #3232

Open
1 task
toly1994328 opened this issue Jul 22, 2024 · 4 comments
Open
1 task

Comments

@toly1994328
Copy link

Problem to solve

When set position or zoom will notifyListeners immediately,But I want to be more flexible with Matrix4, Please support 【set transformMatrix(Matrix4 value)】 for Transform2D

Proposal

set transformMatrix(Matrix4 value) {
_transformMatrix = value.clone();
notifyListeners();
}

More information

No response

Other

  • Are you interested in working on a PR for this?
@spydon
Copy link
Member

spydon commented Jul 22, 2024

Sounds good Matrix4.setFrom should be used though so that it doesn't need to create a new object. Do you want to provide a PR for this?

@toly1994328
Copy link
Author

Sure, Thanks you . PR in #3233 . Now, I can easily implement this interaction:

07.mp4

@toly1994328
Copy link
Author

toly1994328 commented Jul 22, 2024

oh, You should change this filed when set transformMatrix. This is difficult for me, so please handle it by your self ~

image

@Jacda
Copy link
Contributor

Jacda commented Dec 7, 2024

Hi, I've taken an interest in this issue and I'd like to be assigned to it if that's alright.

Seems like adding set transformMatrix would be usefull, but the need to update some attributes like _position results in listeners being notified a few times which undermines part of the issue.

listeners
mark

This could be solved by adding a new boolean into the class which is only set to true when set transformMatrix is updating these variables and doesn't let _markAsModified run notifyListeners during that time. I'd understand if this solution feels too encroaching though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants