Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ts/routes/image-occlusion/mask-editor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down