mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-30 10:50:08 +00:00
minor refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
4a6d7dcc56
commit
19ced24420
@ -219,6 +219,8 @@ actions.Actions({
|
|||||||
// XXX is this the correct way to go???
|
// XXX is this the correct way to go???
|
||||||
// ...can we save simple attribute values???
|
// ...can we save simple attribute values???
|
||||||
dump: ['Dump state as JSOM object',
|
dump: ['Dump state as JSOM object',
|
||||||
|
'This will collect JSON data from every afailable attribute '
|
||||||
|
+'supporting the .dumpJSON() method.',
|
||||||
function(){
|
function(){
|
||||||
var res = {}
|
var res = {}
|
||||||
for(var k in this){
|
for(var k in this){
|
||||||
@ -550,8 +552,8 @@ var Viewer =
|
|||||||
module.Viewer =
|
module.Viewer =
|
||||||
actions.Actions(Client, {
|
actions.Actions(Client, {
|
||||||
|
|
||||||
// Images...
|
|
||||||
/*
|
/*
|
||||||
|
// Images...
|
||||||
get images(){
|
get images(){
|
||||||
return this.ribbons != null ? this.ribbons.images : null
|
return this.ribbons != null ? this.ribbons.images : null
|
||||||
},
|
},
|
||||||
@ -654,7 +656,7 @@ actions.Actions(Client, {
|
|||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
|
|
||||||
toggleTheme: ['',
|
toggleTheme: ['Toggle viewer theme',
|
||||||
CSSClassToggler(
|
CSSClassToggler(
|
||||||
function(){ return this.ribbons.viewer },
|
function(){ return this.ribbons.viewer },
|
||||||
[
|
[
|
||||||
@ -812,13 +814,17 @@ actions.Actions(Client, {
|
|||||||
this.ribbons.setBaseRibbon(r)
|
this.ribbons.setBaseRibbon(r)
|
||||||
}],
|
}],
|
||||||
|
|
||||||
|
// NOTE: these prioritize whole images, i.e. each image will at least
|
||||||
|
// once be fully shown.
|
||||||
prevScreen: ['Focus previous image one screen width away',
|
prevScreen: ['Focus previous image one screen width away',
|
||||||
function(){
|
function(){
|
||||||
this.prevImage(Math.round(this.ribbons.getScreenWidthImages()))
|
// NOTE: the 0.2 is added to compensate for alignment/scaling
|
||||||
|
// errors -- 2.99 images wide counts as 3 while 2.5 as 2.
|
||||||
|
this.prevImage(Math.floor(this.ribbons.getScreenWidthImages() + 0.2))
|
||||||
}],
|
}],
|
||||||
nextScreen: ['Focus next image one screen width away',
|
nextScreen: ['Focus next image one screen width away',
|
||||||
function(){
|
function(){
|
||||||
this.nextImage(Math.round(this.ribbons.getScreenWidthImages()))
|
this.nextImage(Math.floor(this.ribbons.getScreenWidthImages() + 0.2))
|
||||||
}],
|
}],
|
||||||
|
|
||||||
// zooming...
|
// zooming...
|
||||||
@ -1050,7 +1056,8 @@ function Feature(feature_set, obj){
|
|||||||
|
|
||||||
return obj
|
return obj
|
||||||
}
|
}
|
||||||
|
Feature.prototype = FeatureProto
|
||||||
|
Feature.prototype.constructor = Feature
|
||||||
|
|
||||||
|
|
||||||
// XXX experimental...
|
// XXX experimental...
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user