diff --git a/js/faradays-law/view/FaradaysLawScreenView.js b/js/faradays-law/view/FaradaysLawScreenView.js index 0894c7df..a6ee101e 100644 --- a/js/faradays-law/view/FaradaysLawScreenView.js +++ b/js/faradays-law/view/FaradaysLawScreenView.js @@ -45,11 +45,13 @@ define( function( require ) { y: model.topCoil.position.y } ); + // @public {Vector2[]} this.bottomCoilEndPositions = { topEnd: bottomCoilNode.endRelativePositions.topEnd.plus( model.bottomCoil.position ), bottomEnd: bottomCoilNode.endRelativePositions.bottomEnd.plus( model.bottomCoil.position ) }; + // @public {Vector2[]} this.topCoilEndPositions = { topEnd: topCoilNode.endRelativePositions.topEnd.plus( model.topCoil.position ), bottomEnd: topCoilNode.endRelativePositions.bottomEnd.plus( model.topCoil.position ) @@ -81,7 +83,7 @@ define( function( require ) { voltmeterNode.center = FaradaysLawConstants.VOLTMETER_POSITION; this.addChild( voltmeterNode ); - // magnet + // @private this.magnetNodeWithField = new MagnetNodeWithField( model, tandem.createTandem( 'magnet' ) ); this.addChild( this.magnetNodeWithField ); diff --git a/js/faradays-law/view/MagnetAccessibleDragHandler.js b/js/faradays-law/view/MagnetAccessibleDragHandler.js index 356ec528..8f4c54fb 100644 --- a/js/faradays-law/view/MagnetAccessibleDragHandler.js +++ b/js/faradays-law/view/MagnetAccessibleDragHandler.js @@ -28,8 +28,13 @@ define( function( require ) { function MagnetAccessibleDragHandler( positionProperty, startDrag, onDrag ) { var self = this; + // @private this.onDrag = onDrag; + + // @private this.positionProperty = positionProperty; + + // @private this.speedState = { direction: null, speedIndex: -1 }; var stopMotion = function() { diff --git a/js/faradays-law/view/MagnetNodeWithField.js b/js/faradays-law/view/MagnetNodeWithField.js index 9f870bd4..daa410bb 100644 --- a/js/faradays-law/view/MagnetNodeWithField.js +++ b/js/faradays-law/view/MagnetNodeWithField.js @@ -147,7 +147,7 @@ define( function( require ) { } ); draggableNode.addInputListener( dragHandler ); - // The sticky drag handler for keyboard navigation + // @private - The sticky drag handler for keyboard navigation this.magnetAccessibleDragHandler = new MagnetAccessibleDragHandler( model.magnet.positionProperty, function() { model.showMagnetArrowsProperty.set( false ); }, diff --git a/js/faradays-law/view/VoltmeterNode.js b/js/faradays-law/view/VoltmeterNode.js index 68ec602a..fcc859fe 100644 --- a/js/faradays-law/view/VoltmeterNode.js +++ b/js/faradays-law/view/VoltmeterNode.js @@ -89,31 +89,39 @@ define( function( require ) { this.addChild( label ); // add the plus and minus terminals at the bottom - this.plusNode = new Node(); - this.plusNode.addChild( new Rectangle( -TERMINAL_SIZE / 2, -TERMINAL_SIZE / 2, TERMINAL_SIZE, TERMINAL_SIZE, TERMINAL_BORDER_RADIUS, TERMINAL_BORDER_RADIUS, { - fill: TERMINAL_COLOR, - stroke: TERMINAL_STROKE - } ) ); - this.plusNode.addChild( new PlusNode( { - centerX: 0, - centerY: 0, - size: TERMINAL_SIGN_SIZE - } ) ); + // @public + this.plusNode = new Node( { + children: [ + new Rectangle( -TERMINAL_SIZE / 2, -TERMINAL_SIZE / 2, TERMINAL_SIZE, TERMINAL_SIZE, TERMINAL_BORDER_RADIUS, TERMINAL_BORDER_RADIUS, { + fill: TERMINAL_COLOR, + stroke: TERMINAL_STROKE + } ), + new PlusNode( { + centerX: 0, + centerY: 0, + size: TERMINAL_SIGN_SIZE + } ) + ], + center: new Vector2( TERMINAL_SIZE, RECTANGLE_HEIGHT / 2 + TERMINAL_SIZE / 2 ) + } ); this.addChild( this.plusNode ); - this.plusNode.center = new Vector2( TERMINAL_SIZE, RECTANGLE_HEIGHT / 2 + TERMINAL_SIZE / 2 ); - this.minusNode = new Node(); - this.minusNode.addChild( new Rectangle( -TERMINAL_SIZE / 2, -TERMINAL_SIZE / 2, TERMINAL_SIZE, TERMINAL_SIZE, TERMINAL_BORDER_RADIUS, TERMINAL_BORDER_RADIUS, { - fill: TERMINAL_COLOR, - stroke: TERMINAL_STROKE - } ) ); - this.minusNode.addChild( new MinusNode( { - centerX: 0, - centerY: 0, - size: TERMINAL_SIGN_SIZE - } ) ); + // @public + this.minusNode = new Node( { + children: [ + new Rectangle( -TERMINAL_SIZE / 2, -TERMINAL_SIZE / 2, TERMINAL_SIZE, TERMINAL_SIZE, TERMINAL_BORDER_RADIUS, TERMINAL_BORDER_RADIUS, { + fill: TERMINAL_COLOR, + stroke: TERMINAL_STROKE + } ), + new MinusNode( { + centerX: 0, + centerY: 0, + size: TERMINAL_SIGN_SIZE + } ) + ], + center: new Vector2( -TERMINAL_SIZE, RECTANGLE_HEIGHT / 2 + TERMINAL_SIZE / 2 ) + } ); this.addChild( this.minusNode ); - this.minusNode.center = new Vector2( -TERMINAL_SIZE, RECTANGLE_HEIGHT / 2 + TERMINAL_SIZE / 2 ); } faradaysLaw.register( 'VoltmeterNode', VoltmeterNode );