can now add nodes

This commit is contained in:
2026-04-19 05:45:33 +10:00
parent 7e7e6f2c22
commit 34c2aa4316
23 changed files with 864 additions and 1 deletions

View File

@@ -130,6 +130,17 @@ export class WorkspaceNavigator {
/** @returns {number} */
get zoomLevel() { return this.#zoomLevel; }
/**
* Checks if a pan operation occurred recently (within the threshold).
* Useful for suppressing context menus after right-click drag pans.
*
* @param {number} [thresholdMs=100] - Time window in milliseconds
* @returns {boolean}
*/
didPanRecently(thresholdMs = 100) {
return (this.#timestamp() - this.#lastPanTimestamp) < thresholdMs;
}
/**
* Returns the total effective offset (backgroundOffset + pendingLayerOffset).
* Matches WorkspaceNavigationManager.getEffectiveOffset() in Picograph.