iBet uBet web content aggregator. Adding the entire web to your favor.
iBet uBet web content aggregator. Adding the entire web to your favor.



Link to original content: http://github.com/konvajs/konva/issues/1760
Strange behavior when fillingPatternImage and clone update · Issue #1760 · konvajs/konva · GitHub
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

Strange behavior when fillingPatternImage and clone update #1760

Open
webmaxpro opened this issue May 11, 2024 · 2 comments
Open

Strange behavior when fillingPatternImage and clone update #1760

webmaxpro opened this issue May 11, 2024 · 2 comments

Comments

@webmaxpro
Copy link

Good day. I have created an example for you here: https://jsbin.com/dobives/edit?js,output

I need to place an icon in the rotation anchor. And I have implemented it successfully. I also need to make the object copyable. And now on the copied object the rotation icon behaves strangely.

How to test:

  1. Click on the green circle - it becomes active.
  2. Click on the copy button - the red copied item appears
  3. Click on the green (original) - it becomes active. You can move it, rotate it, resize it all right.
  4. Click red (copy) - it becomes active. If you rotate it or resize it, everything is fine. But as soon as you move the red one, the rotation icon above the green one becomes active. That's the problem. I can't understand why it becomes active and how to fix it. Why does moving the copy affect the original? It feels like there is some kind of bug....

er1
er2

@lavrton
Copy link
Member

lavrton commented May 15, 2024

Looke like this issue my be here:

var cloneTrans = trans.clone({
    id: 'trans' + id,
});

It may be better to create a new transformer to not mess things.

@webmaxpro
Copy link
Author

A new transformer can certainly help. The problem is that in the original code I have a lot of eventListenetrs and other functions on the transformer. And all this will have to be repeated for the new transformer. In the clone they were all copied.

And there is obviously some bug, because resizing or rotating does not produce an error, but moving does.....

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