Skip to content

Commit

Permalink
replace PropertySet.toDerivedProperty with DerivedProperty
Browse files Browse the repository at this point in the history
  • Loading branch information
pixelzoom committed Jun 8, 2017
1 parent d998d23 commit 861a74a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/singlebulb/view/SolidBeamNode.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ define( function( require ) {
var VisibleColor = require( 'SCENERY_PHET/VisibleColor' );
var Color = require( 'SCENERY/util/Color' );
var Property = require( 'AXON/Property' );
var DerivedProperty = require( 'AXON/DerivedProperty' );

// constants
var DEFAULT_BEAM_ALPHA = 0.8;
Expand Down Expand Up @@ -108,7 +109,7 @@ define( function( require ) {
}
} );

var visibleProperty = model.toDerivedProperty( [ 'flashlightOn', 'beamType' ],
var visibleProperty = new DerivedProperty( [ model.flashlightOnProperty, model.beamTypeProperty ],
function( flashlightOn, beamType ) {
return ( flashlightOn && beamType === 'beam' );
} );
Expand Down

0 comments on commit 861a74a

Please sign in to comment.