Breaks fabricjs selection control
Version
3.0.0
Reproduction link
https://jsfiddle.net/byd46gfp/1/
Steps to reproduce
- Click the blue rectangle to reveal the selection controls. Notice those controls can't be clicked
- 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/
I found that using markRaw
can make it work correctly:
this.canvas = Vue.markRaw(new fabric.Canvas(c, {
width: c.clientWidth,
height: c.clientHeight
}));