mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-11-01 11:50:07 +00:00
some refactoring of viewer.js...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
2f2a6a0045
commit
f2b7d68672
@ -468,31 +468,21 @@ actions.Actions(Client, {
|
|||||||
this.ribbons = ribbons.Ribbons(viewer, data.images)
|
this.ribbons = ribbons.Ribbons(viewer, data.images)
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE: this is here to prevent animations when the view
|
|
||||||
// is resized and recentered...
|
|
||||||
this.ribbons.preventTransitions()
|
|
||||||
|
|
||||||
// XXX should we use this.reload() here???
|
|
||||||
return function(){
|
return function(){
|
||||||
// XXX do a partial load...
|
// XXX do a partial load...
|
||||||
// XXX
|
// XXX
|
||||||
|
|
||||||
this.ribbons.updateData(this.data)
|
this.reload()
|
||||||
this.focusImage()
|
|
||||||
|
|
||||||
this.ribbons.restoreTransitions()
|
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
reload: [
|
reload: ['Reload viewer',
|
||||||
function(){
|
function(){
|
||||||
this.ribbons.preventTransitions()
|
this.ribbons.preventTransitions()
|
||||||
|
|
||||||
return function(){
|
this.ribbons.updateData(this.data)
|
||||||
this.ribbons.updateData(this.data)
|
this.focusImage()
|
||||||
this.focusImage()
|
|
||||||
|
|
||||||
this.ribbons.restoreTransitions()
|
this.ribbons.restoreTransitions()
|
||||||
}
|
|
||||||
}],
|
}],
|
||||||
clear: [
|
clear: [
|
||||||
// XXX do we need to delete the ribbons???
|
// XXX do we need to delete the ribbons???
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user