mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-30 02:40:08 +00:00
migrating new code to makeCSSClassToggler(..)...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
862ba3f203
commit
4138112b82
@ -37,7 +37,7 @@ module.exitFullscreen = function() {
|
|||||||
|
|
||||||
|
|
||||||
window.toggleFullscreenMode =
|
window.toggleFullscreenMode =
|
||||||
module.toggleFullscreenMode = createCSSClassToggler(
|
module.toggleFullscreenMode = makeCSSClassToggler(
|
||||||
document.body,
|
document.body,
|
||||||
'.full-screen-mode',
|
'.full-screen-mode',
|
||||||
function(action){
|
function(action){
|
||||||
|
|||||||
@ -99,6 +99,7 @@ var USE_3D_TRANSFORM = true
|
|||||||
// we are changing into but the changes are not yet made.
|
// we are changing into but the changes are not yet made.
|
||||||
// NOTE: if the pre-callback explicitly returns false, then the change will
|
// NOTE: if the pre-callback explicitly returns false, then the change will
|
||||||
// not be made.
|
// not be made.
|
||||||
|
/*
|
||||||
function createCSSClassToggler(elem, class_list, callback_a, callback_b){
|
function createCSSClassToggler(elem, class_list, callback_a, callback_b){
|
||||||
var bool_action = false
|
var bool_action = false
|
||||||
if(typeof(class_list) == typeof('')){
|
if(typeof(class_list) == typeof('')){
|
||||||
@ -229,6 +230,7 @@ function createCSSClassToggler(elem, class_list, callback_a, callback_b){
|
|||||||
|
|
||||||
return func
|
return func
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
|
||||||
// Make a generic toggler function/method...
|
// Make a generic toggler function/method...
|
||||||
@ -281,6 +283,9 @@ function makeToggler(elem, state_accessor, states, callback_a, callback_b){
|
|||||||
var action = b == 'next' ? null : b
|
var action = b == 'next' ? null : b
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// XXX is this correct???
|
||||||
|
var args = args2array(arguments).slice(2)
|
||||||
|
|
||||||
// option number...
|
// option number...
|
||||||
if(typeof(action) == typeof(1)){
|
if(typeof(action) == typeof(1)){
|
||||||
// range check...
|
// range check...
|
||||||
|
|||||||
@ -20,7 +20,7 @@ var browser = require('browser')
|
|||||||
//var data = require('data')
|
//var data = require('data')
|
||||||
|
|
||||||
window.toggleFullscreenMode =
|
window.toggleFullscreenMode =
|
||||||
module.toggleFullscreenMode = createCSSClassToggler(
|
module.toggleFullscreenMode = makeCSSClassToggler(
|
||||||
document.body,
|
document.body,
|
||||||
'.full-screen-mode',
|
'.full-screen-mode',
|
||||||
function(action){
|
function(action){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user