debug: add console.log to InteractionEngine to trace drawing flow

This commit is contained in:
2026-06-26 19:01:45 +02:00
parent 7e530dd09a
commit f9f31db933
+4
View File
@@ -235,6 +235,7 @@ export class InteractionEngine {
switch (this.state.activeTool) { switch (this.state.activeTool) {
case 'select': case 'select':
console.log('[DEBUG] onMouseDown tool=select');
this.handleSelectDown(e, raw); this.handleSelectDown(e, raw);
break; break;
case 'line': case 'line':
@@ -246,6 +247,7 @@ export class InteractionEngine {
case 'text': case 'text':
case 'dimension': case 'dimension':
case 'leader': case 'leader':
console.log('[DEBUG] onMouseDown tool=' + this.state.activeTool + ' phase=' + this.state.phase);
this.handleDrawDown(final); this.handleDrawDown(final);
break; break;
case 'revcloud': case 'revcloud':
@@ -466,6 +468,7 @@ export class InteractionEngine {
} }
private handleDrawDown(pt: { x: number; y: number }): void { private handleDrawDown(pt: { x: number; y: number }): void {
console.log('[DEBUG] handleDrawDown called', { tool: this.state.activeTool, phase: this.state.phase, points: this.state.points.length, pt });
this.state.phase = 'drawing'; this.state.phase = 'drawing';
this.state.points.push(pt); this.state.points.push(pt);
@@ -948,6 +951,7 @@ export class InteractionEngine {
} }
private confirmDraw(): void { private confirmDraw(): void {
console.log('[DEBUG] confirmDraw called', { tool: this.state.activeTool, hasPreview: !!this.state.previewElement, points: this.state.points.length });
if (!this.state.previewElement) return; if (!this.state.previewElement) return;
const layerId = this.layerManager.getActiveLayerId(); const layerId = this.layerManager.getActiveLayerId();
const dimService = new DimensionService(); const dimService = new DimensionService();