mirror of
https://github.com/ankitects/anki.git
synced 2026-01-12 13:33:55 -05:00
add io mask rotation snapping
This commit is contained in:
parent
8c72b03f4c
commit
91983d2043
1 changed files with 3 additions and 0 deletions
|
|
@ -106,6 +106,9 @@ function initCanvas(): fabric.Canvas {
|
|||
fabric.Object.prototype.cornerStyle = "circle";
|
||||
fabric.Object.prototype.cornerStrokeColor = "#000000";
|
||||
fabric.Object.prototype.padding = 8;
|
||||
// snap rotation around 0 by +-3deg
|
||||
fabric.Object.prototype.snapAngle = 360;
|
||||
fabric.Object.prototype.snapThreshold = 3;
|
||||
// disable rotation when selecting
|
||||
canvas.on("selection:created", () => {
|
||||
const g = canvas.getActiveObject();
|
||||
|
|
|
|||
Loading…
Reference in a new issue