| Slider Component |
Mar 12 2009, 10:06 AM
Joined: 1-September 06
From: ̶O̶h̶i̶o̶ Washington
Member No.: 16,587
|Original Post as Follows:
Just include the file Slider.js
(please download and run it locally).
You can use it like this:
var window = new Window();
var slider = new Slider(window);
slider.ticks = 10;
slider.width = 125;
slider.hOffset = 10;
slider.vOffset = 325;
The window/frame is passed to the constructor, that kinda makes it hard to remove or add to other frames/windows ... but you can hack the source if you want more than that (or traverse the DOM and do it the hard way).
I was more interested in quick-dev and too lazy to generate JsDoc for it ...
So the total properties include:
- width of slider component (may have to adjust to get lines "pixel perfect"), not the true width of the actual visible slider.
- horizontal offset of the component.
- vertical offset of the component.
- The minimum value of this slider. Must be < max.
- The maximum value of this slider. Must be > min.
- number of total ticks, including the min and max. Must be > 2.
- whether to snap to ticks or not. snapping may not be exactly perfect with drawn ticks, just really damn close.
- The current value of the slider. Values outside of the slider's range will be capped.
This slider does work for negative ranges, I believe.
A result of starting my server over, links from my posts may not work (especially those in the "temp" subdomain). If there is a link to something of which anyone would like to have a copy, personal message me with what you're looking for along with a way to provide this to you, and I'll see if I can find a copy. Thanks for your patience and understanding. - "Not just another open source project. Lend your talent and make a difference!"
- "The future is now." (No longer community site)
(Domain has lapsed)Published: AtomicComicBlast, Barra de Lenguas, ComicWizard-4.0, MicroColors, PassGen, ScrabbleChecker, SoundBank, Uni, VisualWidget, WarpedReality
Paradigm [clock], Puzzled, SecurityLogger, Wayback Widget
Ready to be published: Cαlcυlατοr, CursorTails, Blackout, Block Puzzler, BombSquad, Palette, SnipIt
InactiveDev/Dead: BeatMod, Bubble Pop, Canvas Clock, Canvas Gauges, Canvas Pro, Clipboard, Crayon, Hermes, InTune, Konverter, Magic Deck, OverRuled, Outside, Slither, SystemBeat, Tetresque, Tetrad, Widget, WinSysRemote
Dropped: BlankScreen, Document "Fixer", Intuitive [ -> Blackout], Motion Widget: HHGTTG
Atmosphere, Block Puzzler, BombSquadMiniature Scripts: BinarySearchTree
, Canvas Gears
, MDI Setup
, MiniMax AI
, Slider widget
, TreeMenuJava+: Java Music Daemon
, ScreenCapture JAR
, Widget-Java/Server Bridge Example"Published" Texts: DynamicWidgetGuide Konfabulator Libraries:
, Javable Widget ProjectWidget Tutorials: "Spawning" Widgets
, Konspirators Online
, PHP BB-Code Parser
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)