EyeDropperNode¶
Overview¶
Eye dropper, with a button for dispensing whatever is in the dropper.
@author Chris Malley (PixelZoom, Inc.)
Class EyeDropperNode¶
Constructor¶
new EyeDropperNode( provideOptions? : EyeDropperNodeOptions )¶
Instance Methods¶
dispose()¶
getFluidColor() : TPaint¶
Gets the color of the fluid in the dropper.
setFluidColor( color : TPaint )¶
Sets the color of the fluid in the dropper.
Instance Properties¶
isDispensingProperty : Property<boolean>¶
(readonly)
is the dropper dispensing?
isEmptyProperty : Property<boolean>¶
(readonly)
is the dropper empty of fluid?
button : Node¶
(readonly)
for clients who want to hide the button
Static Properties¶
TIP_WIDTH¶
(readonly)
You'll need these if you want to create fluid coming out of the tip.
TIP_HEIGHT¶
(readonly)
GLASS_WIDTH¶
(readonly)
GLASS_MIN_Y¶
(readonly)
You'll need these if you want to put a label on the glass. Values are relative to bottom center.
GLASS_MAX_Y¶
(readonly)
Type EyeDropperNodeOptions¶
- isDispensingProperty?: Property<boolean>
is the dropper dispensing? - isEmptyProperty?: Property<boolean>
does the dropper appear to be empty? - fluidColor?: TPaint
color of the fluid in the glass - buttonOptions?: RoundMomentaryButtonOptions
propagated to RoundMomentaryButton - & StrictOmit<NodeOptions, "children">
Source Code¶
See the source for EyeDropperNode.ts in the scenery-phet repository.