Skip to content

Commit

Permalink
Migrate from ObservableArray => createObservableArray (Proxy), see ph…
Browse files Browse the repository at this point in the history
  • Loading branch information
samreid committed Oct 2, 2020
1 parent 8d957bb commit 48926a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions js/common/model/Graph.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Chris Malley (PixelZoom, Inc.)
*/

import ObservableArray from '../../../../axon/js/ObservableArray.js';
import createObservableArray from '../../../../axon/js/createObservableArray.js';
import Vector2 from '../../../../dot/js/Vector2.js';
import graphingLines from '../../graphingLines.js';

Expand All @@ -21,7 +21,7 @@ class Graph {
// @public
this.xRange = xRange;
this.yRange = yRange;
this.lines = new ObservableArray(); // {Line} lines that the graph is currently displaying
this.lines = createObservableArray(); // {Line} lines that the graph is currently displaying
}

// @public
Expand Down
6 changes: 3 additions & 3 deletions js/common/model/LineFormsModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @author Chris Malley (PixelZoom, Inc.)
*/

import ObservableArray from '../../../../axon/js/ObservableArray.js';
import createObservableArray from '../../../../axon/js/createObservableArray.js';
import Property from '../../../../axon/js/Property.js';
import Bounds2 from '../../../../dot/js/Bounds2.js';
import Vector2 from '../../../../dot/js/Vector2.js';
Expand Down Expand Up @@ -41,8 +41,8 @@ class LineFormsModel {
this.modelViewTransform = ModelViewTransform2.createOffsetXYScaleMapping( ORIGIN_OFFSET, modelViewTransformScale, -modelViewTransformScale ); // y is inverted

// @public static lines
this.savedLines = new ObservableArray();
this.standardLines = new ObservableArray();
this.savedLines = createObservableArray();
this.standardLines = createObservableArray();

// Update the lines seen by the graph.
// unmultilink is unnecessary because we own these Properties, and the model exists for the lifetime of the sim.
Expand Down

0 comments on commit 48926a3

Please sign in to comment.