mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +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)]) }],
|
||||
|
||||
['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...
|
||||
// NOTE: this is mostly to attach stuff that is stored in separate files...
|
||||
|
||||
// .current...
|
||||
d.current = index.current || d.current
|
||||
|
||||
|
||||
// images...
|
||||
// XXX there seems to be a problem with updated images...
|
||||
// - in the test set not all rotated manually images are loaded rotated...
|
||||
@ -892,10 +888,7 @@ function(json, changes){
|
||||
: changes == null ? true
|
||||
: changes
|
||||
|
||||
// always save current...
|
||||
var res = {
|
||||
current: json.data.current,
|
||||
}
|
||||
var res = {}
|
||||
|
||||
// data...
|
||||
if(changes === true || changes && changes.data){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user