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 <noreply@anthropic.com>
This commit is contained in:
Adriano
2026-02-08 10:45:56 +01:00
parent f665bffb7a
commit f2df6be060
2 changed files with 9 additions and 2 deletions
+8 -1
View File
@@ -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();