diff --git a/ui (gen4)/features/core.js b/ui (gen4)/features/core.js index afd7b3db..d5211ef1 100755 --- a/ui (gen4)/features/core.js +++ b/ui (gen4)/features/core.js @@ -311,7 +311,7 @@ module.makeWorkspaceConfigLoader = function(keys, callback){ keys = typeof(keys) == typeof(function(){}) ? keys() : keys - // load statusbar data... + // load data... keys.forEach(function(key){ // the key exists... if(key in workspace){ diff --git a/ui (gen4)/features/ui.js b/ui (gen4)/features/ui.js index 8f7197b7..adcbcd41 100755 --- a/ui (gen4)/features/ui.js +++ b/ui (gen4)/features/ui.js @@ -1830,94 +1830,93 @@ var ControlActions = actions.Actions({ threshold: this.config['ribbon-pan-threshold'], }) - r - .on('pan', function(evt){ - //evt.stopPropagation() + r.on('pan', function(evt){ + //evt.stopPropagation() - // XXX stop all previous animations... - //r.velocity("stop") + // XXX stop all previous animations... + //r.velocity("stop") - var d = that.ribbons.dom - var s = that.scale - var g = evt.gesture + var d = that.ribbons.dom + var s = that.scale + var g = evt.gesture - var data = r.data('drag-data') + var data = r.data('drag-data') - // we just started... - if(!data){ - that.__control_in_progress = (that.__control_in_progress || 0) + 1 + // we just started... + if(!data){ + that.__control_in_progress = (that.__control_in_progress || 0) + 1 - // hide and remove current image indicator... - // NOTE: it will be reconstructed on - // next .focusImage(..) - var m = that.ribbons.viewer - .find('.current-marker') - .velocity({opacity: 0}, { - duration: 100, - complete: function(){ - m.remove() - }, - }) + // hide and remove current image indicator... + // NOTE: it will be reconstructed on + // next .focusImage(..) + var m = that.ribbons.viewer + .find('.current-marker') + .velocity({opacity: 0}, { + duration: 100, + complete: function(){ + m.remove() + }, + }) - // store initial position... - var data = { - left: d.getOffset(this).left, - pointers: g.pointers.length, - } - r.data('drag-data', data) + // store initial position... + var data = { + left: d.getOffset(this).left, + pointers: g.pointers.length, } + r.data('drag-data', data) + } - // do the actual move... - d.setOffset(this, data.left + (g.deltaX / s)) + // do the actual move... + d.setOffset(this, data.left + (g.deltaX / s)) - // update ribbon when "pulling" with two fingers... - if(g.pointers.length != data.pointers){ - data.pointers = g.pointers.length + // update ribbon when "pulling" with two fingers... + if(g.pointers.length != data.pointers){ + data.pointers = g.pointers.length - // load stuff if needed... - that.updateRibbon(that.ribbons.getImageByPosition('center', r)) - } + // load stuff if needed... + that.updateRibbon(that.ribbons.getImageByPosition('center', r)) + } - // when done... - if(g.isFinal){ - r.removeData('drag-data') + // when done... + if(g.isFinal){ + r.removeData('drag-data') - // XXX this seems to have trouble with off-screen images... - var central = that.ribbons.getImageByPosition('center', r) + // XXX this seems to have trouble with off-screen images... + var central = that.ribbons.getImageByPosition('center', r) - // load stuff if needed... - that.updateRibbon(central) + // load stuff if needed... + that.updateRibbon(central) + + // XXX add inertia.... + /* XXX + console.log('!!!!', g.velocityX) + r.velocity({ + translateX: (data.left + g.deltaX + (g.velocityX * 10)) +'px' + }, 'easeInSine') + */ + + // silently focus central image... + if(that.config['focus-central-image'] == 'silent'){ + var gid = that.ribbons.getElemGID(central) + + // XXX is this the right way to do this??? + that.data.focusImage(gid) + that.ribbons.focusImage(gid) - // XXX add inertia.... - /* XXX - console.log('!!!!', g.velocityX) - r.velocity({ - translateX: (data.left + g.deltaX + (g.velocityX * 10)) +'px' - }, 'easeInSine') - */ - - // silently focus central image... - if(that.config['focus-central-image'] == 'silent'){ - var gid = that.ribbons.getElemGID(central) - - // XXX is this the right way to do this??? - that.data.focusImage(gid) - that.ribbons.focusImage(gid) - - // focus central image in a normal manner... - } else if(that.config['focus-central-image']){ - that.focusImage(that.ribbons.getElemGID(central)) - } - - setTimeout(function(){ - that.__control_in_progress -= 1 - if(that.__control_in_progress <= 0){ - delete that.__control_in_progress - } - }, 50) + // focus central image in a normal manner... + } else if(that.config['focus-central-image']){ + that.focusImage(that.ribbons.getElemGID(central)) } - }) + + setTimeout(function(){ + that.__control_in_progress -= 1 + if(that.__control_in_progress <= 0){ + delete that.__control_in_progress + } + }, 50) + } + }) } } diff --git a/ui (gen4)/index.html b/ui (gen4)/index.html index 2d7192cc..989b2b6e 100755 --- a/ui (gen4)/index.html +++ b/ui (gen4)/index.html @@ -233,9 +233,11 @@ body { diff --git a/ui (gen4)/lib/features.js b/ui (gen4)/lib/features.js index 3b13faf0..0db42761 100755 --- a/ui (gen4)/lib/features.js +++ b/ui (gen4)/lib/features.js @@ -102,19 +102,19 @@ module.FeatureProto = { } // merge config... - // XXX should this use inheritance??? - // XXX do we need to clone .config? + // NOTE: this will merge the actual config in .config.__proto__ + // keeping the .config clean for the user to lay with... if(this.config != null || (this.actions != null && this.actions.config != null)){ var config = this.config = this.config || this.actions.config if(actions.config == null){ - actions.config = {} + actions.config = Object.create({}) } Object.keys(config).forEach(function(n){ // NOTE: this will overwrite existing values... - actions.config[n] = config[n] + actions.config.__proto__[n] = config[n] }) } diff --git a/ui (gen4)/lib/toggler.js b/ui (gen4)/lib/toggler.js index 6749e2b9..5a0e35eb 100755 --- a/ui (gen4)/lib/toggler.js +++ b/ui (gen4)/lib/toggler.js @@ -340,6 +340,10 @@ function CSSClassToggler(elem, classes, callback_a, callback_b){ : classes_set classes = typeof(classes) == typeof('str') ? ['none', classes] : classes + if(classes == null){ + console.log('!!!!!!') + } + // remove the dot from class names... // NOTE: this is here because I've made the error of including a // leading "." almost every time I use this after I forget diff --git a/ui (gen4)/package.json b/ui (gen4)/package.json index 6c264cb6..54e35cca 100755 --- a/ui (gen4)/package.json +++ b/ui (gen4)/package.json @@ -13,7 +13,7 @@ "toolbar": false, "show": false }, - "chromium-args": "", + "chromium-args": "--disable-gpu-compositing", "dependencies": { "app-module-path": "^1.0.6", "commander": "^2.9.0",