Skip to content

Commit

Permalink
Provide default args for ResetFuseButton, see #589
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Aug 4, 2020
1 parent 26363f0 commit 5bbb26d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions js/view/CircuitElementEditContainerNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

import Range from '../../../dot/js/Range.js';
import Vector2 from '../../../dot/js/Vector2.js';
import merge from '../../../phet-core/js/merge.js';
import StringUtils from '../../../phetcommon/js/util/StringUtils.js';
import HBox from '../../../scenery/js/nodes/HBox.js';
Expand All @@ -18,6 +19,7 @@ import Panel from '../../../sun/js/Panel.js';
import SunConstants from '../../../sun/js/SunConstants.js';
import PhetioGroup from '../../../tandem/js/PhetioGroup.js';
import PhetioGroupIO from '../../../tandem/js/PhetioGroupIO.js';
import Tandem from '../../../tandem/js/Tandem.js';
import CCKCConstants from '../CCKCConstants.js';
import circuitConstructionKitCommon from '../circuitConstructionKitCommon.js';
import circuitConstructionKitCommonStrings from '../circuitConstructionKitCommonStrings.js';
Expand All @@ -31,6 +33,7 @@ import LightBulb from '../model/LightBulb.js';
import Resistor from '../model/Resistor.js';
import SeriesAmmeter from '../model/SeriesAmmeter.js';
import Switch from '../model/Switch.js';
import Vertex from '../model/Vertex.js';
import Wire from '../model/Wire.js';
import CircuitElementNumberControl from './CircuitElementNumberControl.js';
import ClearDynamicsButton from './ClearDynamicsButton.js';
Expand Down Expand Up @@ -92,8 +95,8 @@ class CircuitElementEditContainerNode extends Node {
} );

const resetFuseButtonGroup = new PhetioGroup(
( tandem, circuitElement ) => new ResetFuseButton( circuitElement, tandem ),
[ null ], {
( tandem, circuitElement ) => new ResetFuseButton( tandem, circuitElement ),
[ new Fuse( new Vertex( Vector2.ZERO ), new Vertex( Vector2.ZERO ), Tandem.OPT_OUT, {} ) ], {
phetioType: PhetioGroupIO( NodeIO ),
tandem: tandem.createTandem( 'resetFuseButtonGroup' )
} );
Expand Down
4 changes: 2 additions & 2 deletions js/view/ResetFuseButton.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ import CCKCRoundPushButton from './CCKCRoundPushButton.js';
class ResetFuseButton extends CCKCRoundPushButton {

/**
* @param {Fuse} fuse - the Fuse to reset
* @param {Tandem} tandem
* @param {Fuse} fuse - the Fuse to reset
*/
constructor( fuse, tandem ) {
constructor( tandem, fuse ) {

const shape = new Shape().moveTo( 0, 0 ).zigZagToPoint( new Vector2( 35, 0 ), 4.7, 4, false );

Expand Down

0 comments on commit 5bbb26d

Please sign in to comment.