Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // UI blocker library:
- window.uiBlocker = (function() {
- // [ some private functions ]
- function show() {
- // ...
- }
- function hide() {
- // ...
- }
- return {
- show: show,
- hide: hide
- }
- } () );
- // Other components, which might go treading on each others' toes:
- window.uiBlocker.show();
- window.uiBlocker.hide();
- // The way I'd LIKE it to work:
- var miniController = window.uiBlocker.getMiniController();
- // This creates a new mini-controller for you. The UI controller will remember it in an array.
- miniController.activate();
- miniController.deactivate();
- // As long as any mini-controller is in the active state, the UI blocker is present.
- // Each time a mini-controller's altered, it signals the UI blocker controller to update.
- // The UI blocker controller will check each of the mini-controllers it's handed out,
- // and as long as any is active, it'll show up.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement