mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-28 18:00:09 +00:00
fixed a bug with loading + some tweaking...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
6358945168
commit
1c58bdc9e3
@ -1891,6 +1891,8 @@ progress:not(value)::-webkit-progress-bar {
|
||||
|
||||
.single-image-mode.viewer .ribbon {
|
||||
background-color: transparent;
|
||||
|
||||
will-change: auto;
|
||||
}
|
||||
.single-image-mode.viewer .current-marker {
|
||||
/* NOTE: !important here fixes the jQuery habit of explicitly
|
||||
|
||||
@ -947,11 +947,10 @@ module.Base = core.ImageGridFeatures.Feature({
|
||||
}],
|
||||
['prepareJSONForLoad',
|
||||
function(res, json, base_path){
|
||||
console.log('>>>>', res, json, base_path)
|
||||
|
||||
// build data and images...
|
||||
// XXX do we actually need to build stuff here, shouldn't
|
||||
// .load(..) take care of this???
|
||||
//var d = json.data
|
||||
var d = data.Data.fromJSON(json.data)
|
||||
|
||||
d.current = json.current || d.current
|
||||
|
||||
@ -2530,6 +2530,7 @@ var DataPrototype = {
|
||||
// NOTE: this loads in-place, use .fromJSON(..) to create new data...
|
||||
// XXX should this process defaults for unset values???
|
||||
loadJSON: function(data){
|
||||
var that = this
|
||||
data = typeof(data) == typeof('str') ? JSON.parse(data) : data
|
||||
data = formats.updateData(data)
|
||||
this.base = data.base
|
||||
@ -2538,7 +2539,6 @@ var DataPrototype = {
|
||||
this.ribbon_order = data.ribbon_order.slice()
|
||||
|
||||
// make sparse lists...
|
||||
var that = this
|
||||
this.__gid_lists.forEach(function(s){
|
||||
if(data[s] == null){
|
||||
return
|
||||
|
||||
@ -139,11 +139,20 @@ module.getLatestUpdaterVersion = function(){
|
||||
// format.
|
||||
// NOTE: if data is already in the latest format this will return it
|
||||
// as-is.
|
||||
module.updateData = function(data){
|
||||
module.updateData = function(data, clean){
|
||||
var v = module.getLatestUpdaterVersion()
|
||||
return data.version < v
|
||||
var res = data.version < v
|
||||
? module.VERSIONS[v](data)
|
||||
: data
|
||||
|
||||
!clean
|
||||
&& Object.keys(data).forEach(function(k){
|
||||
if(res[k] == null){
|
||||
res[k] = data[k]
|
||||
}
|
||||
})
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user