chore: Fix typo in getRelativeToSurfaceXY() (#9586)

This commit is contained in:
Aaron Dodson
2026-02-12 10:22:13 -08:00
committed by GitHub
parent 87afe3e688
commit 2ada188f88

View File

@@ -354,8 +354,8 @@ export class BlockSvg
* @returns Object with .x and .y properties in workspace coordinates.
*/
override getRelativeToSurfaceXY(): Coordinate {
const layerManger = this.workspace.getLayerManager();
if (!layerManger) {
const layerManager = this.workspace.getLayerManager();
if (!layerManager) {
throw new Error(
'Cannot calculate position because the workspace has not been appended',
);
@@ -371,7 +371,7 @@ export class BlockSvg
x += xy.x;
y += xy.y;
element = element.parentNode as SVGElement;
} while (element && !layerManger.hasLayer(element));
} while (element && !layerManager.hasLayer(element));
}
return new Coordinate(x, y);
}