fabric-brush icon indicating copy to clipboard operation
fabric-brush copied to clipboard

doesn't work with canvas.setZoom(x)

Open blobinabottle opened this issue 7 years ago • 2 comments

Hi

Great library. I have an issue so far: it doesn't work if you change canvas zoom level. It also doesn't "drop" the shape on my canvas.

Any thought?

blobinabottle avatar Feb 28 '17 14:02 blobinabottle

OK got it working with zoom by passing viewportTransform.

vp = this.canvas.viewportTransform;
ctx.transform(vp[0], vp[1], vp[2], vp[3], vp[4], vp[5]);      

blobinabottle avatar Feb 28 '17 16:02 blobinabottle

Where in the code exactly did you add that?

jonaslund avatar Apr 14 '21 14:04 jonaslund