From f2df6be0605517ef2dbfaf6764395a3a027d3c35 Mon Sep 17 00:00:00 2001 From: Adriano Date: Sun, 8 Feb 2026 10:45:56 +0100 Subject: [PATCH] fix: enable resize/rotate controls on single-click object selection In setMode('select'), explicitly set hasControls, hasBorders, and evented on all objects. In drawing modes, disable selectable/evented to prevent accidental interaction. Fixes controls only appearing on multi-select drag. Co-Authored-By: Claude Opus 4.6 --- client/static/js/annotation-editor.js | 9 ++++++++- client/templates/maker/task_drawing.html | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/client/static/js/annotation-editor.js b/client/static/js/annotation-editor.js index 44c7c67..7d3baed 100644 --- a/client/static/js/annotation-editor.js +++ b/client/static/js/annotation-editor.js @@ -526,12 +526,19 @@ function annotationEditor() { this.canvas.defaultCursor = 'default'; this.canvas.forEachObject(function (o) { o.selectable = true; + o.evented = true; + o.hasControls = true; + o.hasBorders = true; }); } else { - // marker, arrow, rect + // marker, arrow, rect — disable object interaction during drawing this.canvas.selection = false; this.canvas.defaultCursor = 'crosshair'; this.canvas.discardActiveObject(); + this.canvas.forEachObject(function (o) { + o.selectable = false; + o.evented = false; + }); } this.canvas.renderAll(); diff --git a/client/templates/maker/task_drawing.html b/client/templates/maker/task_drawing.html index 8fc348a..0700828 100644 --- a/client/templates/maker/task_drawing.html +++ b/client/templates/maker/task_drawing.html @@ -353,7 +353,7 @@ - +