mirror of
https://github.com/ankitects/anki.git
synced 2026-01-12 13:33:55 -05:00
populate canvas.targets with subtargets during mouse events
This commit is contained in:
parent
1f3d03f7f8
commit
c6c59a5e01
1 changed files with 2 additions and 0 deletions
|
|
@ -109,6 +109,8 @@ function initCanvas(): fabric.Canvas {
|
||||||
// snap rotation around 0 by +-3deg
|
// snap rotation around 0 by +-3deg
|
||||||
fabric.Object.prototype.snapAngle = 360;
|
fabric.Object.prototype.snapAngle = 360;
|
||||||
fabric.Object.prototype.snapThreshold = 3;
|
fabric.Object.prototype.snapThreshold = 3;
|
||||||
|
// populate canvas.targets with subtargets during mouse events
|
||||||
|
fabric.Group.prototype.subTargetCheck = true;
|
||||||
// disable rotation when selecting
|
// disable rotation when selecting
|
||||||
canvas.on("selection:created", () => {
|
canvas.on("selection:created", () => {
|
||||||
const g = canvas.getActiveObject();
|
const g = canvas.getActiveObject();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue