From 8218ebbeb0d5e828b67c642461483cad12582780 Mon Sep 17 00:00:00 2001 From: chrisklus Date: Thu, 30 Mar 2023 16:20:04 -0600 Subject: [PATCH] Simplifly trail slice, see https://github.com/phetsims/number-suite-common/issues/29 --- js/common/view/CountingCreatorNode.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/js/common/view/CountingCreatorNode.ts b/js/common/view/CountingCreatorNode.ts index a9f6791..04c7bfb 100644 --- a/js/common/view/CountingCreatorNode.ts +++ b/js/common/view/CountingCreatorNode.ts @@ -197,8 +197,7 @@ class CountingCreatorNode extends Node { public getOriginPosition(): Vector2 { // Trail to coordinateFrameNode, not including the coordinateFrameNode - let trail = this.coordinateFrameNode.getUniqueLeafTrailTo( this.targetNode ); - trail = trail.slice( 1, trail.length ); + let trail = this.coordinateFrameNode.getUniqueLeafTrailTo( this.targetNode ).slice( 1 ); // Transformed to view coordinates let origin = this.frontTargetNode.localBounds.center.plus( this.backTargetOffset );