Currently the simulation pays lip service to the modelViewTransform. Although it is used throughout the simulation it is set to unity.
In pendulumLabModel.js, one finds
metersToPixels: new LinearFunction( 0, 1, 0, 175 )
it would be preferable to define a modelViewTransform of the form
modelViewTransform= new ModelViewTransform2.createOffsetScaleMapping( new Vector2(0,0), 175)
in this way the modelViewTransform.viewToModelDeltaX can replace the invocation of the metersToPixels function
For the MovableDragHandler, if the location and the dragbounds are in view coordinates, one can create a modelViewTransform that is equal to ModelViewTransform2.createIdentity() just for this purpose.
Currently the simulation pays lip service to the modelViewTransform. Although it is used throughout the simulation it is set to unity.
In pendulumLabModel.js, one finds
it would be preferable to define a modelViewTransform of the form
in this way the modelViewTransform.viewToModelDeltaX can replace the invocation of the metersToPixels function
For the MovableDragHandler, if the location and the dragbounds are in view coordinates, one can create a modelViewTransform that is equal to ModelViewTransform2.createIdentity() just for this purpose.