slideshow fixes + button...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2017-11-27 01:20:35 +03:00
parent 904abeed68
commit a8e095c09d
2 changed files with 19 additions and 0 deletions

View File

@ -29,6 +29,8 @@ var overlay = require('lib/widget/overlay')
// XXX would be a good idea to add provision for a timer to indicate
// slideshow progress/status...
// - make this a separate feature with a toggler
// XXX might be a good idea to add "slideshow hold", for example while
// mouse down...
var SlideshowActions = actions.Actions({
config: {
'slideshow-looping': 'on',
@ -125,6 +127,7 @@ var SlideshowActions = actions.Actions({
}
})],
// XXX should this reflect slideshow state???? (ready, running, paused???)
slideshowDialog: ['Slideshow/Slideshow...',
widgets.makeUIDialog(function(){
var that = this
@ -299,6 +302,9 @@ module.Slideshow = core.ImageGridFeatures.Feature({
}
}],
['load',
function(){ this.toggleSlideshow('off') }],
// - build the slideshow workspace for the first time if it's not
// present yet (is null)...
// - restore .config['single-image-toggle-on-click']

View File

@ -1976,6 +1976,10 @@ var ButtonsActions = actions.Actions({
'C<sub/>': ['crop', 'browseActions: "Crop/" -- Crop menu...'],
//'&#9636;<sub/>': ['collections', 'browseCollections -- Collections...'],
//'&#9974;': ['view', 'toggleSingleImage -- Single image / ribbon toggle'],
'&#9655;': ['slideshow', [
'toggleSlideshow -- Toggle slideshow',
'slideshowDialog -- Slideshow menu...',
]],
},
// XXX not sure about these yet...
@ -2129,6 +2133,15 @@ module.Buttons = core.ImageGridFeatures.Feature({
.html(this.collection ? '&#9679;' : '')
//*/
}],
// update slideshow status...
['toggleSlideshow',
function(){
$('.main-buttons.buttons .slideshow.button')
.html(this.toggleSlideshow('?') == 'on' ?
'&#9724;'
//'&#9723;'
: '&#9655;')
}],
// update zoom button status...
['viewScale',
function(){