This shows you the differences between two versions of the page.
software:modules-and-examples:interlocking [2013/05/09 01:31] aaron |
software:modules-and-examples:interlocking [2013/12/08 02:35] (current) jarrod [Instructions] |
||
---|---|---|---|
Line 17: | Line 17: | ||
==== Instructions ==== | ==== Instructions ==== | ||
- | The below instructions are included in the Interlock.js file. | + | The instructions are included in the [[https://github.com/CommandFusion/DemoUserInterfaces/tree/master/Interlock|GitHub readme]] and the Interlock.js file. |
- | + | ||
- | <sxh js; light: true> | + | |
- | // A simple module to manage interlock groups in iViewer | + | |
- | // | + | |
- | // The module provides a suite of simple calls to manage interlocks: | + | |
- | // | + | |
- | // * to create an interlock group: | + | |
- | Interlock.create("group name", join1, join2 ... joinN); | + | |
- | + | ||
- | // * to set the currently selected item in an interlock group: | + | |
- | Interlock.select("group name", join); | + | |
- | + | ||
- | // * to be notified when the current selection of an interlock group changes: | + | |
- | Interlock.watch("group name", function(group name, newSelectedJoin, previousSelectedJoin) { | + | |
- | // ... do something here ... | + | |
- | }); | + | |
- | + | ||
- | // * to stop being notified for an interlock group | + | |
- | Interlock.unwatch("group name"); | + | |
- | + | ||
- | // * to get the current selected join for an interlock group | + | |
- | var join = Interlock.get("group name"); | + | |
- | + | ||
- | // * to remove an interlock group (remove interlock functionality): | + | |
- | Interlock.remove("group name"); | + | |
- | + | ||
- | // Author: Florent Pillet, CommandFusion | + | |
- | + | ||
- | </sxh> | + | |
==== Download ==== | ==== Download ==== | ||
- | {{:software:examples-software:gui-examples:commandfusion_interlock_demo.zip| Click here to download the required files}} | + | [[https://github.com/CommandFusion/DemoUserInterfaces/raw/master/Interlock/Interlock.zip|Click here to download the required files]] |
\\ | \\ |