-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
instrumented RulerNode for phet-io, see phetsims/gravity-force-lab#76
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} ); | ||
|