From 9271682ebafd010991623481bb23e44faffa1206 Mon Sep 17 00:00:00 2001 From: poanse <50020771+poanse@users.noreply.github.com> Date: Thu, 5 Feb 2026 09:45:22 +0300 Subject: [PATCH] changed log to debug --- src/Context.svelte.ts | 4 ++-- src/DraggingManager.svelte.ts | 4 ++-- src/components/AddTaskButton.svelte | 2 +- src/components/Task.svelte | 6 +++--- src/components/TaskText.svelte | 2 +- src/components/TaskmapContainer.svelte | 10 +++++----- src/legacy/text-input.js | 18 +++++++++--------- src/main.ts | 16 ++++++++-------- 8 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/Context.svelte.ts b/src/Context.svelte.ts index ece9a8a..71e5e62 100644 --- a/src/Context.svelte.ts +++ b/src/Context.svelte.ts @@ -379,7 +379,7 @@ export class Context { public save() { const x = this.view; x.debouncedSave(); - console.log("saved"); + console.debug("saved"); } public addTask(parentId: TaskId): void { @@ -409,7 +409,7 @@ export class Context { } public changeStatus(status: StatusCode) { - console.log( + console.debug( `changeStatus from ${this.toolbarStatus} to ${status} for task ${this.selectedTaskId}`, ); this.projectData.setTaskStatus(this.selectedTaskId, status); diff --git a/src/DraggingManager.svelte.ts b/src/DraggingManager.svelte.ts index 09b52c6..2d8f74b 100644 --- a/src/DraggingManager.svelte.ts +++ b/src/DraggingManager.svelte.ts @@ -15,7 +15,7 @@ export class DraggingManager { } public onPointerDown = (e: PointerEvent) => { - console.log("DraggingManager pointerDown"); + console.debug("DraggingManager pointerDown"); this.mouseDown = e.button as MouseDown; if (this.mouseCodes.contains(this.mouseDown)) { this.startX = e.clientX; @@ -28,7 +28,7 @@ export class DraggingManager { }; public onPointerUp = (e: PointerEvent) => { - console.log(`DraggingManager pointerUp: ${this.deltaX}`); + console.debug(`DraggingManager pointerUp: ${this.deltaX}`); this.mouseDown = MouseDown.NONE; this.isDragging = false; this.deltaX = 0; diff --git a/src/components/AddTaskButton.svelte b/src/components/AddTaskButton.svelte index 8c8563e..65ab13b 100644 --- a/src/components/AddTaskButton.svelte +++ b/src/components/AddTaskButton.svelte @@ -10,7 +10,7 @@ let entered = $state(false); function addButtonPressed(event: PointerEvent) { - console.log('addButtonPressed'); + console.debug('addButtonPressed'); context.addTask(taskId); context.finishTaskDragging(event); event.stopPropagation(); diff --git a/src/components/Task.svelte b/src/components/Task.svelte index 2e3b5b7..4016f7f 100644 --- a/src/components/Task.svelte +++ b/src/components/Task.svelte @@ -50,12 +50,12 @@ } function onPointerUp(event: PointerEvent) { - console.log(`Task clicked ${taskId}`); + console.debug(`Task clicked ${taskId}`); if (context.taskDraggingManager.isDragging) { return; } if (context.chosenBlockedId !== NoTaskId) { - console.log('Task click add blocker branch'); + console.debug('Task click add blocker branch'); if ( context.isValidBlockerTarget(taskId)){ const blockerPair = {blocked: context.chosenBlockedId, blocker: taskId}; if (context.projectData.containsBlockerPair(blockerPair)) { @@ -67,7 +67,7 @@ } } else if (context.chosenBlockerId !== NoTaskId) { - console.log('Task click add blocked branch'); + console.debug('Task click add blocked branch'); if (context.isValidBlockedTarget(taskId)) { const blockerPair = {blocked: taskId, blocker: context.chosenBlockerId}; if (context.projectData.containsBlockerPair(blockerPair)) { diff --git a/src/components/TaskText.svelte b/src/components/TaskText.svelte index f6a1c6e..6ad16d8 100644 --- a/src/components/TaskText.svelte +++ b/src/components/TaskText.svelte @@ -57,7 +57,7 @@ return; } context.finishTaskDragging(e); - console.log('task text clicked'); + console.debug('task text clicked'); if (context.isSelected(taskId)) { e.stopPropagation(); toggleEdit(); diff --git a/src/components/TaskmapContainer.svelte b/src/components/TaskmapContainer.svelte index 3a07eb4..6b8efa7 100644 --- a/src/components/TaskmapContainer.svelte +++ b/src/components/TaskmapContainer.svelte @@ -43,7 +43,7 @@ }); function handleKey(e: KeyboardEvent) { - console.log('handleKey ', e.key); + console.debug('handleKey ', e.key); if (e.key === "Escape") { context.setSelectedTaskId(-1); context.cancelReparenting(); @@ -79,7 +79,7 @@ } function onpointermove(e: PointerEvent) { - console.log('handlePointerMove', e.pointerId, e.button); + console.debug('handlePointerMove', e.pointerId, e.button); if (context.draggedTaskId != NoTaskId) { context.taskDraggingManager.onPointerMove(e); if (context.taskDraggingManager.isDragging) { @@ -104,13 +104,13 @@ } function onpointerup(e: PointerEvent) { - console.log('handlePointerUp', e.pointerId, e.button); + console.debug('handlePointerUp', e.pointerId, e.button); if (draggingManager.isDragging) { // Release the pointer capture (e.currentTarget as HTMLDivElement).releasePointerCapture(e.pointerId); } else if (e.button as MouseDown == MouseDown.LEFT) { - console.log(`Window clicked + ${context.serializeForDebugging()}`); - console.log('selectedTaskId ' + context.selectedTaskId); + console.debug(`Window clicked + ${context.serializeForDebugging()}`); + console.debug('selectedTaskId ' + context.selectedTaskId); context.pressedButtonCode = -1; context.setSelectedTaskId(-1); context.cancelReparenting(); diff --git a/src/legacy/text-input.js b/src/legacy/text-input.js index ef7622b..e269d03 100644 --- a/src/legacy/text-input.js +++ b/src/legacy/text-input.js @@ -136,9 +136,9 @@ export default class TextInput extends Container { } focus() { - console.log("focus called"); + console.debug("focus called"); if (this._substituted && !this.dom_visible) { - console.log("dom input visible: true"); + console.debug("dom input visible: true"); this._setDOMInputVisible(true); } @@ -302,7 +302,7 @@ export default class TextInput extends Container { _updateDOMInput() { if (!this._canvas_bounds) { - console.log("No Canvas Bounds"); + console.debug("No Canvas Bounds"); return; } @@ -313,7 +313,7 @@ export default class TextInput extends Container { // transform.tx += 10; // transform.ty += 50; this._dom_input.style.transform = this._pixiMatrixToCSS(transform); - console.log( + console.debug( JSON.stringify({ top: this._dom_input.style.top, left: this._dom_input.style.left, @@ -321,9 +321,9 @@ export default class TextInput extends Container { }), ); this._dom_input.style.opacity = this.worldAlpha; - console.log("Alpha", this.worldAlpha); + console.debug("Alpha", this.worldAlpha); this._setDOMInputVisible(this.worldVisible && this._dom_visible); - console.log("world visible", this.worldVisible); + console.debug("world visible", this.worldVisible); this._previous.canvas_bounds = this._canvas_bounds; this._previous.world_transform = this.worldTransform.clone(); @@ -600,10 +600,10 @@ export default class TextInput extends Container { } _getCanvasBounds() { - console.log("getting bounds"); + console.debug("getting bounds"); // let rect = this._last_renderer.view.getBoundingClientRect(); let rect = this._last_renderer.view.screen; - console.log(`Bounds: ${JSON.stringify(rect)}`); + console.debug(`Bounds: ${JSON.stringify(rect)}`); let bounds = { top: rect.top, left: rect.left, @@ -645,7 +645,7 @@ export default class TextInput extends Container { let canvas_bounds = this._last_renderer.view.screen; let matrix = this.worldTransform.clone(); - console.log(JSON.stringify(matrix)); + console.debug(JSON.stringify(matrix)); matrix.scale(this._resolution, this._resolution); matrix.scale( canvas_bounds.width / this._last_renderer.width, diff --git a/src/main.ts b/src/main.ts index cb60b33..b385309 100644 --- a/src/main.ts +++ b/src/main.ts @@ -40,17 +40,17 @@ export default class TaskmapPlugin extends Plugin { // // If the plugin hooks up any global DOM events (on parts of the app that doesn't belong to this plugin) // // Using this function will automatically remove the event listener when this plugin is disabled. // this.registerDomEvent(document, 'click', (evt: MouseEvent) => { - // console.log('click', evt); + // console.debug('click', evt); // }); // // When registering intervals, this function will automatically clear the interval when the plugin is disabled. - // this.registerInterval(window.setInterval(() => console.log('setInterval'), 5 * 60 * 1000)); + // this.registerInterval(window.setInterval(() => console.debug('setInterval'), 5 * 60 * 1000)); this.registerEvent( this.app.vault.on( "rename", async (file: TAbstractFile, oldPath: string) => { - console.log(`${file.path} renamed`); + console.debug(`${file.path} renamed`); if (file instanceof TFile) { await this.handleRenameFiles( this.app, @@ -90,7 +90,7 @@ export default class TaskmapPlugin extends Plugin { // update paths in taskmap files for (const taskmapFile of taskmapFiles) { - console.log(`handling ${taskmapFile.path}`); + console.debug(`handling ${taskmapFile.path}`); const projectDataRaw = await this.app.vault.read(taskmapFile); const projectData = deserializeProjectData( this.app, @@ -105,11 +105,11 @@ export default class TaskmapPlugin extends Plugin { mapping.set(t.path, t); } }); - console.log("mapping " + JSON.stringify(mapping.keys())); + console.debug("mapping " + JSON.stringify(mapping.keys())); let changed = false; changedMdFiles.forEach((mdFile) => { if (mdFile.path.contains("testNote")) { - console.log(`testNode filepath ${mdFile.path}`); + console.debug(`testNode filepath ${mdFile.path}`); } if (mapping.has(mdFile.path)) { const t = mapping.get(mdFile.path)!; @@ -118,12 +118,12 @@ export default class TaskmapPlugin extends Plugin { } }); if (changed) { - console.log(`${taskmapFile.path} changed`); + console.debug(`${taskmapFile.path} changed`); // resave file on the file system await updateFile(app, taskmapFile, projectData); updatedTaskMapFilePaths.add(taskmapFile.path); } else { - console.log(`${taskmapFile.path} not changed`); + console.debug(`${taskmapFile.path} not changed`); } }