From 78211aee7e25ea6c8b4c7299903aba35568e7050 Mon Sep 17 00:00:00 2001 From: jbphet Date: Tue, 29 Nov 2016 14:19:10 -0700 Subject: [PATCH] instrumented RulerNode for phet-io, see https://github.com/phetsims/gravity-force-lab/issues/76 --- js/types/scenery-phet/TRulerNode.js | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 js/types/scenery-phet/TRulerNode.js diff --git a/js/types/scenery-phet/TRulerNode.js b/js/types/scenery-phet/TRulerNode.js new file mode 100644 index 000000000..081ae91cb --- /dev/null +++ b/js/types/scenery-phet/TRulerNode.js @@ -0,0 +1,36 @@ +// Copyright 2016, University of Colorado Boulder + +/** + * wrapper type for RulerNode + * + * @author Sam Reid (PhET Interactive Simulations) + * @author John Blanco (PhET Interactive Simulations) + */ +define( function( require ) { + 'use strict'; + + // modules + var assertInstanceOf = require( 'PHET_IO/assertions/assertInstanceOf' ); + var phetioInherit = require( 'PHET_IO/phetioInherit' ); + var phetioNamespace = require( 'PHET_IO/phetioNamespace' ); + var TNode = require( 'PHET_IO/types/scenery/nodes/TNode' ); + + /** + * @param {RulerNode} rulerNode + * @param {string} phetioID + * @constructor + */ + function TRulerNode( rulerNode, phetioID ) { + TNode.call( this, rulerNode, phetioID ); + assertInstanceOf( rulerNode, phet.sceneryPhet.RulerNode ); + } + + phetioInherit( TNode, 'TRulerNode', TRulerNode, {}, { + documentation: 'A node with the visual appearance of a ruler' + } ); + + phetioNamespace.register( 'TRulerNode', TRulerNode ); + + return TRulerNode; +} ); +