mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 02:10:08 +00:00
cleanup and more refactoring...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
bfd7f1ad70
commit
dec295fd05
@ -921,6 +921,20 @@ module.Base = core.ImageGridFeatures.Feature({
|
|||||||
],
|
],
|
||||||
function(_, target){ this.markChanged('images', [this.data.getImage(target)]) }],
|
function(_, target){ this.markChanged('images', [this.data.getImage(target)]) }],
|
||||||
|
|
||||||
|
['prepareIndexForWrite',
|
||||||
|
function(res){
|
||||||
|
res.index.current = res.raw.data.current
|
||||||
|
|
||||||
|
// XXX .data
|
||||||
|
// XXX .images
|
||||||
|
}],
|
||||||
|
['prepareJSONForLoad',
|
||||||
|
function(res, json){
|
||||||
|
res.data.current = json.current || res.data.current
|
||||||
|
|
||||||
|
// XXX .data
|
||||||
|
// XXX .images
|
||||||
|
}],
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
@ -795,10 +795,6 @@ module.buildIndex = function(index, base_path){
|
|||||||
// buildup the data object...
|
// buildup the data object...
|
||||||
// NOTE: this is mostly to attach stuff that is stored in separate files...
|
// NOTE: this is mostly to attach stuff that is stored in separate files...
|
||||||
|
|
||||||
// .current...
|
|
||||||
d.current = index.current || d.current
|
|
||||||
|
|
||||||
|
|
||||||
// images...
|
// images...
|
||||||
// XXX there seems to be a problem with updated images...
|
// XXX there seems to be a problem with updated images...
|
||||||
// - in the test set not all rotated manually images are loaded rotated...
|
// - in the test set not all rotated manually images are loaded rotated...
|
||||||
@ -892,10 +888,7 @@ function(json, changes){
|
|||||||
: changes == null ? true
|
: changes == null ? true
|
||||||
: changes
|
: changes
|
||||||
|
|
||||||
// always save current...
|
var res = {}
|
||||||
var res = {
|
|
||||||
current: json.data.current,
|
|
||||||
}
|
|
||||||
|
|
||||||
// data...
|
// data...
|
||||||
if(changes === true || changes && changes.data){
|
if(changes === true || changes && changes.data){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user