Remove Number() calls
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Siklos 2022-08-15 22:57:08 +02:00
parent dd2079b975
commit 3c164581ce
7 changed files with 34 additions and 34 deletions

View file

@ -43,12 +43,12 @@ export function getDepth(parent: IContainerModel): number {
* @returns The absolute position of the container
*/
export function getAbsolutePosition(container: IContainerModel): [number, number] {
let x = Number(container.properties.x);
let y = Number(container.properties.y);
let x = container.properties.x;
let y = container.properties.y;
let current = container.parent;
while (current != null) {
x += Number(current.properties.x);
y += Number(current.properties.y);
x += current.properties.x;
y += current.properties.y;
current = current.parent;
}
return [x, y];