From f4e5189b357fe57bd6b7345e29d8021d9e214ff9 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 6 Oct 2017 17:43:02 +0300 Subject: [PATCH] some tweaking and notes... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/app.js | 8 ++++++ ui (gen4)/features/filesystem.js | 2 +- ui (gen4)/features/keyboard.js | 2 +- ui (gen4)/index.html | 47 +++++++++++++++++++------------- ui (gen4)/package.json | 2 +- ui (gen4)/ui.js | 17 ------------ 6 files changed, 39 insertions(+), 39 deletions(-) diff --git a/ui (gen4)/features/app.js b/ui (gen4)/features/app.js index d6cb576e..6c8b4869 100755 --- a/ui (gen4)/features/app.js +++ b/ui (gen4)/features/app.js @@ -364,6 +364,14 @@ module.AppControl = core.ImageGridFeatures.Feature({ actions: AppControlActions, + // XXX BUG: when running in electron: + // - loading this breaks the other buttons (menu, collections, ...) + // - .toggleFullScreen(..) works in an odd manner -- ok when + // explicitly called or button pushed but in opposite manner + // when F11 (FIXED?) + // - ready protocol breaks -- need to call .ready() to unstall + // the viewer + // ...does this all have anything to do with double init??? //isApplicable: function(){ return this.runtime.desktop }, isApplicable: function(){ return this.runtime.desktop && !this.runtime.electron }, diff --git a/ui (gen4)/features/filesystem.js b/ui (gen4)/features/filesystem.js index b590d945..99b5dd8f 100755 --- a/ui (gen4)/features/filesystem.js +++ b/ui (gen4)/features/filesystem.js @@ -227,7 +227,7 @@ module.FileSystemInfo = core.ImageGridFeatures.Feature({ // NOTE: this will also manage .location.from var FileSystemLoaderActions = actions.Actions({ config: { - 'image-file-pattern': '*+(jpg|jpeg|png|JPG|JPEG|PNG)', + 'image-file-pattern': '*+(jpg|jpeg|png|svg|JPG|JPEG|PNG|svg)', 'image-file-read-stat': true, 'image-file-skip-previews': false, diff --git a/ui (gen4)/features/keyboard.js b/ui (gen4)/features/keyboard.js index c28047c4..2fdea742 100755 --- a/ui (gen4)/features/keyboard.js +++ b/ui (gen4)/features/keyboard.js @@ -244,7 +244,7 @@ module.GLOBAL_KEYBOARD = { // NOTE: this is handled by the wrapper at this point, so we do // not have to do anything here... - F11: 'toggleFullScreen', + F11: 'toggleFullScreen!', ctrl_F: 'F11', meta_F: 'F11', diff --git a/ui (gen4)/index.html b/ui (gen4)/index.html index 9f45c2a0..f5c851bd 100755 --- a/ui (gen4)/index.html +++ b/ui (gen4)/index.html @@ -6,34 +6,43 @@ - - - - - - - - - - + + + + + + + + + + - - - - - - + + + + + + - + - + diff --git a/ui (gen4)/package.json b/ui (gen4)/package.json index 119e697a..7c39720d 100755 --- a/ui (gen4)/package.json +++ b/ui (gen4)/package.json @@ -23,7 +23,7 @@ "glob": "^4.0.6", "guarantee-events": "^1.0.0", "ig-actions": "^3.8.0", - "ig-features": "^3.3.1", + "ig-features": "^3.3.2", "ig-object": "^1.0.2", "openseadragon": "^2.3.1", "pica": "^3.0.6", diff --git a/ui (gen4)/ui.js b/ui (gen4)/ui.js index 332d4788..c597cc49 100755 --- a/ui (gen4)/ui.js +++ b/ui (gen4)/ui.js @@ -102,23 +102,6 @@ var viewer = require('imagegrid/viewer') $(function(){ - /*/ list all loaded modules... - var m = requirejs.s.contexts._.defined - m = Object.keys(m).filter(function(e){ return m[e] != null }) - console.log('Modules:', m) - //*/ - - /*/ self-test... - var test = viewer.ImageGridFeatures.buildFeatureList() - if(test.error){ - // report loops... - var err = test.error - err.loops.forEach(function(loop){ - console.warn('Self-test: Feature dependency loops detected:\n\t' - + loop.join('\n\t\t-> ')) }) - } - //*/ - try { // setup actions... window.ig =