From 16d5fb2316024d74d27efc51cb2965cd5a2f9c2a Mon Sep 17 00:00:00 2001 From: AgustinVallejo Date: Wed, 15 Mar 2023 14:23:45 -0500 Subject: [PATCH] Fixing VectorNode, see https://github.com/phetsims/my-solar-system/issues/104 --- js/keplers-laws/view/KeplersLawsScreenView.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/keplers-laws/view/KeplersLawsScreenView.ts b/js/keplers-laws/view/KeplersLawsScreenView.ts index bb91a71..88858ae 100644 --- a/js/keplers-laws/view/KeplersLawsScreenView.ts +++ b/js/keplers-laws/view/KeplersLawsScreenView.ts @@ -27,6 +27,7 @@ import OrbitalWarningMessage from './OrbitalWarningMessage.js'; import StopwatchNode from '../../../../scenery-phet/js/StopwatchNode.js'; import DistancesDisplayNode from './DistancesDisplayNode.js'; import keplersLaws from '../../keplersLaws.js'; +import NumberProperty from '../../../../axon/js/NumberProperty.js'; // constants const MARGIN = 10; @@ -96,12 +97,12 @@ class KeplersLawsScreenView extends SolarSystemCommonScreenView { // Gravity force vectors this.componentsLayer.addChild( new VectorNode( body, this.modelViewTransformProperty, model.gravityVisibleProperty, body.forceProperty, - 0.05, { fill: PhetColorScheme.GRAVITATIONAL_FORCE } + new NumberProperty( 0 ), { fill: PhetColorScheme.GRAVITATIONAL_FORCE } ) ); this.componentsLayer.addChild( new VectorNode( sun, this.modelViewTransformProperty, model.gravityVisibleProperty, sun.forceProperty, - 0.05, { fill: PhetColorScheme.GRAVITATIONAL_FORCE } + new NumberProperty( 0 ), { fill: PhetColorScheme.GRAVITATIONAL_FORCE } ) ); const ellipticalOrbitNode = new EllipticalOrbitNode( model, this.modelViewTransformProperty );