mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 18:30:09 +00:00
updated setBase/focusImage signatures and docs...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
8dc1590a46
commit
a28af7c2ce
27
ui/data4.js
27
ui/data4.js
@ -72,25 +72,30 @@ var DataPrototype = {
|
|||||||
return gid
|
return gid
|
||||||
},
|
},
|
||||||
|
|
||||||
// target can be:
|
// This is signature compatible with .getImage(..), see it for more
|
||||||
// image gid
|
// info...
|
||||||
// image order
|
|
||||||
// ribbon gid
|
|
||||||
// list
|
|
||||||
//
|
//
|
||||||
// XXX do we need more specific focus operations like:
|
// XXX do we need more specific focus operations like:
|
||||||
// .focusImage(offset)
|
// .focusImageOffset(offset)
|
||||||
// .focusRibbon(offset)
|
// XXX reference impelementation:
|
||||||
|
// return this.focusImage('current', offset)
|
||||||
|
// .focusRibbonOffset(offset)
|
||||||
|
// XXX reference impelementation:
|
||||||
|
// var c = this.getRibbonOrder()
|
||||||
|
// var t = c+offset
|
||||||
|
// return this.focusImage('current', (t < c ? 'after' : 'before'), t)
|
||||||
focusImage: function(target, mode, list){
|
focusImage: function(target, mode, list){
|
||||||
var current = this.getImage(target, mode, list)
|
var current = this.getImage(target, mode, list)
|
||||||
if(current != null){
|
if(this.order.indexOf(current) >= 0){
|
||||||
this.current = current
|
this.current = current
|
||||||
}
|
}
|
||||||
return this
|
return this
|
||||||
},
|
},
|
||||||
setBase: function(target){
|
// This is signature compatible with .getRibbon(..), see it for more
|
||||||
var base = this.getRibbon(target)
|
// info...
|
||||||
if(base != null){
|
setBase: function(target, offset){
|
||||||
|
var base = this.getRibbon(target, offset)
|
||||||
|
if(base in this.ribbons){
|
||||||
this.base = base
|
this.base = base
|
||||||
}
|
}
|
||||||
return this
|
return this
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user