mirror of
https://github.com/litruv/lit.ruv.wtf.git
synced 2026-07-24 02:36:02 +10:00
can now add nodes
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user