Skip to content

Commit

Permalink
Revert "Add an intermediate Node that contains the body + nozzle, and…
Browse files Browse the repository at this point in the history
… make it public, see #660"

This reverts commit 186e921
  • Loading branch information
samreid committed Feb 2, 2021
1 parent cd464f3 commit 11e53d2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions js/LaserPointerNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ class LaserPointerNode extends Node {
right: 0,
centerY: 0
} );
children.push( nozzleNode );

// the main body of the laser pointer
const bodyNode = new Rectangle( 0, 0, options.bodySize.width, options.bodySize.height, {
Expand All @@ -118,8 +119,7 @@ class LaserPointerNode extends Node {
right: nozzleNode.left + options.cornerRadius, // overlap to hide corner radius
centerY: nozzleNode.centerY
} );
const bodyAndNozzleNode = new Node( { children: [ nozzleNode, bodyNode ] } );
children.push( bodyAndNozzleNode );
children.push( bodyNode );

// the optional button that controls whether the laser is on or off
let onOffButton = null;
Expand Down Expand Up @@ -178,9 +178,6 @@ class LaserPointerNode extends Node {

// support for binder documentation, stripped out in builds and only runs when ?binder is specified
assert && phet.chipper.queryParameters.binder && InstanceRegistry.registerDataURL( 'scenery-phet', 'LaserPointerNode', this );

// @public (read-only) {Node} - in case the client needs to add input listeners to that part
this.bodyAndNozzleNode = bodyAndNozzleNode;
}

get enabled() { return this.isEnabled(); }
Expand Down

0 comments on commit 11e53d2

Please sign in to comment.