You received this message because you are subscribed to the Google Groups "Developing Interactive Simulations in HTML5" group.
To unsubscribe from this group and stop receiving emails from it, send an email to developing-interactive-simu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/developing-interactive-simulations-in-html5/a7137a0e-3a95-41d4-8985-5b27f8078aedn%40googlegroups.com.
Greetings Polar Bear!
I was the primary developer for the Molecule Polarity simulation. The slider in Molecule Polarity is ElectronegativitySlider, which is a subclass of HSlider. It adds functionality that is specific to Molecule Polarity, which makes it more complicated to adapt to other applications. So I do NOT recommend trying to reuse ElectronegativitySlider in your application.
Instead, please see PhET’s “sun” repository, which is where you’ll find PhET’s standard slider, and other standard UI components. Slider.ts is the base class. HSlider.ts is a horizontal slider, while VSlider.ts is a vertical slider — and they are both subclasses of Slider. Source code is in the sun/js/ directory.
For examples of how to use HSlider and VSlider, see the sun demo application, specifically sun/js/demo/components/demoSlider.ts. To run the sun demo, load sun/sun_en.html in your browser. Go to the “Components” screen, and select HSlider or VSlider from the “Select a Demo” menu.
I hope this helps!
Chris Malley / PixelZoom, Inc.