mirror of
https://github.com/google/blockly.git
synced 2026-02-13 11:00:10 +01:00
chore: Fix typo in getRelativeToSurfaceXY() (#9586)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user