diff --git a/js/common/model/PointController.js b/js/common/model/PointController.js index 8fdb2ee..e4b2d6e 100644 --- a/js/common/model/PointController.js +++ b/js/common/model/PointController.js @@ -29,7 +29,6 @@ define( require => { class PointController { /** - * TODO: constructor changed: update all new PointController calls * @param {Object} [options] */ constructor( options ) { @@ -155,6 +154,16 @@ define( require => { } get controlledNumberLinePoint() { return this.getControlledNumberLinePoint(); } + /** + * gets the first controlled number line if it exists; null if otherwise + * @returns {NumberLine|null} + * @public + */ + getNumberLine() { + return ( this.numberLines.length > 0 )? this.numberLines[ 0 ] : null; + } + get numberLine() { return this.getNumberLine(); } + /** * returns whether this point controller controls a number line point or is even associated with a number line point * @returns {boolean}