Skip to content

Commit

Permalink
instrumented RulerNode for phet-io, see phetsims/gravity-force-lab#76
Browse files Browse the repository at this point in the history
  • Loading branch information
jbphet authored and zepumph committed Mar 13, 2017
1 parent 2413b2e commit 78211ae
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions js/types/scenery-phet/TRulerNode.js
Original file line number Diff line number Diff line change
@@ -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;
} );

0 comments on commit 78211ae

Please sign in to comment.