Document the preserve and dependencyLists params for recordOperation

This commit is contained in:
LuShadowX 2026-07-23 19:31:33 +05:30
parent 0c8f67059e
commit 388168a2b8

View File

@ -303,6 +303,10 @@ class CanvasBBoxTracker {
/**
* @param {number} idx
* @param {boolean} [preserve=false] - When false, the pending bounding box is
* cleared once recorded; pass true to keep it for subsequent operations.
* @param {Iterable<Iterable<number>>} [dependencyLists] - Groups of operation
* indices whose bounding boxes are also expanded to cover this operation.
*/
recordOperation(idx, preserve = false, dependencyLists) {
if (this._pendingBBoxIdx !== idx) {
@ -735,6 +739,8 @@ class CanvasDependencyTracker {
/**
* @param {number} idx
* @param {boolean} [preserve=false] - When false, the pending dependencies
* are cleared once recorded; pass true to keep them for later operations.
*/
recordOperation(idx, preserve = false) {
this.recordDependencies(idx, [FORCED_DEPENDENCY_LABEL]);