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

Breaks fabricjs selection control #2370

Closed
deerchao opened this issue Oct 13, 2020 · 2 comments
Closed

Breaks fabricjs selection control #2370

deerchao opened this issue Oct 13, 2020 · 2 comments

Comments

@deerchao
Copy link

Version

3.0.0

Reproduction link

https://jsfiddle.net/byd46gfp/1/

Steps to reproduce

  1. Click the blue rectangle to reveal the selection controls. Notice those controls can't be clicked
  2. Click button "Add" to add another rectangle; drag on canvas with mouse to form a region that contains both rectangles to select both rectangles; click empty space in canvas to deselect those rectangles; click any rectangle to select it. Notice the selection controls work this time, you can resize/rotate the rectangle with them.

What is expected?

Selection controls would always work, after step 1.

What is actually happening?

It doesn't work after step 1.


Note, it works with vue 2.x: https://jsfiddle.net/byd46gfp/2/

@HcySunYang
Copy link
Member

I found that using markRaw can make it work correctly:

    this.canvas = Vue.markRaw(new fabric.Canvas(c, {
      width: c.clientWidth,
      height: c.clientHeight
    }));

@deerchao
Copy link
Author

Thanks, it works with markRaw.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants