changed log to debug

This commit is contained in:
poanse 2026-02-05 09:45:22 +03:00
parent 0e8c1d22ca
commit 9271682eba
8 changed files with 31 additions and 31 deletions

View file

@ -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);

View file

@ -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;

View file

@ -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();

View file

@ -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)) {

View file

@ -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();

View file

@ -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();

View file

@ -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,

View file

@ -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`);
}
}