 |
|
 |
Slider Component |
|
|
| CSM |
Mar 12 2009, 10:06 AM
|

Posts: 2,386
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: CODE 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
- width of slider component (may have to adjust to get lines "pixel perfect"), not the true width of the actual visible slider.
- hOffset
- horizontal offset of the component.
- vOffset
- vertical offset of the component.
- min
- The minimum value of this slider. Must be < max.
- max
- The maximum value of this slider. Must be > min.
- ticks
- number of total ticks, including the min and max. Must be > 2.
- snap
- whether to snap to ticks or not. snapping may not be exactly perfect with drawn ticks, just really damn close.
- value
- 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!" (Dead) - "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 Unavailable: Paradigm [clock], Puzzled, SecurityLogger, Wayback Widget Ready to be published: Cαlcυlατοr, CursorTails, Blackout, Block Puzzler, BombSquad, Palette, SnipIt ActiveDev: 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 CoDevelopment: Atmosphere, Block Puzzler, BombSquadMiniature Scripts: BinarySearchTree, Calendar, Canvas Gears, Checkbox, File-Browser, LinkedList/Stack, MDI Setup, MiniMax AI, PieGraph, ProgressBar, Slider widget, TabbedPane, Table, Tokenizer, TreeMenuJava+: Java Music Daemon, ScreenCapture JAR, Widget-Java/Server Bridge Example"Published" Texts: DynamicWidgetGuide Konfabulator Libraries: Color-space Library, Javable Widget ProjectWidget Tutorials: "Spawning" Widgets, JavaScript ClassesContests: Widget 4k - "Expanded" [not happening; canceled]Non-Widget Work: Hazlenut, Konspirators Online, PHP BB-Code Parser, ShortClient, Zap
|
|
|
|
|
|
|
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:
|
 |