diff options
author | 2016-11-16 17:40:01 +0200 | |
---|---|---|
committer | 2016-11-16 17:40:01 +0200 | |
commit | 11c216470c30e4c200e46e1b51d721a549f440d6 (patch) | |
tree | 03ad20c67decf7da4d52e5679c2fd22dd8f5eaa6 /doc/backends/deckjs/deck.js/extensions/deck.js-blank/deck.blank.js | |
parent | e46e3f598e52112b9db21d6faabde7a5c87341cb (diff) | |
parent | efba1bd2c32391c443a9dbaf0fffa6468bb681c6 (diff) |
Merge branch 'master' to rx_features phase 0.5
Signed-off-by: imarom <imarom@cisco.com>
Diffstat (limited to 'doc/backends/deckjs/deck.js/extensions/deck.js-blank/deck.blank.js')
-rw-r--r-- | doc/backends/deckjs/deck.js/extensions/deck.js-blank/deck.blank.js | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/doc/backends/deckjs/deck.js/extensions/deck.js-blank/deck.blank.js b/doc/backends/deckjs/deck.js/extensions/deck.js-blank/deck.blank.js new file mode 100644 index 00000000..01955834 --- /dev/null +++ b/doc/backends/deckjs/deck.js/extensions/deck.js-blank/deck.blank.js @@ -0,0 +1,33 @@ +/*! +Deck JS - deck.blank - v1.0 +Copyright (c) 2012 Mike Kellenberger +*/ + +/* +This module adds the necessary methods and key bindings to blank/unblank the screen by pressing 'b'. +*/ +(function($, deck, undefined) { + var $d = $(document); + + $[deck]('extend', 'activateBlankScreen', function() { + $[deck]('getSlide').hide(); + }); + + $[deck]('extend', 'deactivateBlankScreen', function() { + $[deck]('getSlide').show(); + }); + + $[deck]('extend', 'blankScreen', function() { + $[deck]('getSlide').is(":visible") ? $[deck]('activateBlankScreen') : $[deck]('deactivateBlankScreen'); + }); + + $d.bind('deck.init', function() { + // Bind key events + $d.unbind('keydown.blank').bind('keydown.blank', function(e) { + if (e.which==66) { + $[deck]('blankScreen'); + e.preventDefault(); + } + }); + }); +})(jQuery, 'deck');
\ No newline at end of file |