mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-10-29 10:20:08 +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 {
|
.single-image-mode.viewer .ribbon {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
|
|
||||||
|
will-change: auto;
|
||||||
}
|
}
|
||||||
.single-image-mode.viewer .current-marker {
|
.single-image-mode.viewer .current-marker {
|
||||||
/* NOTE: !important here fixes the jQuery habit of explicitly
|
/* NOTE: !important here fixes the jQuery habit of explicitly
|
||||||
|
|||||||
@ -947,11 +947,10 @@ module.Base = core.ImageGridFeatures.Feature({
|
|||||||
}],
|
}],
|
||||||
['prepareJSONForLoad',
|
['prepareJSONForLoad',
|
||||||
function(res, json, base_path){
|
function(res, json, base_path){
|
||||||
console.log('>>>>', res, json, base_path)
|
|
||||||
|
|
||||||
// build data and images...
|
// build data and images...
|
||||||
// XXX do we actually need to build stuff here, shouldn't
|
// XXX do we actually need to build stuff here, shouldn't
|
||||||
// .load(..) take care of this???
|
// .load(..) take care of this???
|
||||||
|
//var d = json.data
|
||||||
var d = data.Data.fromJSON(json.data)
|
var d = data.Data.fromJSON(json.data)
|
||||||
|
|
||||||
d.current = json.current || d.current
|
d.current = json.current || d.current
|
||||||
|
|||||||
@ -2530,6 +2530,7 @@ var DataPrototype = {
|
|||||||
// NOTE: this loads in-place, use .fromJSON(..) to create new data...
|
// NOTE: this loads in-place, use .fromJSON(..) to create new data...
|
||||||
// XXX should this process defaults for unset values???
|
// XXX should this process defaults for unset values???
|
||||||
loadJSON: function(data){
|
loadJSON: function(data){
|
||||||
|
var that = this
|
||||||
data = typeof(data) == typeof('str') ? JSON.parse(data) : data
|
data = typeof(data) == typeof('str') ? JSON.parse(data) : data
|
||||||
data = formats.updateData(data)
|
data = formats.updateData(data)
|
||||||
this.base = data.base
|
this.base = data.base
|
||||||
@ -2538,7 +2539,6 @@ var DataPrototype = {
|
|||||||
this.ribbon_order = data.ribbon_order.slice()
|
this.ribbon_order = data.ribbon_order.slice()
|
||||||
|
|
||||||
// make sparse lists...
|
// make sparse lists...
|
||||||
var that = this
|
|
||||||
this.__gid_lists.forEach(function(s){
|
this.__gid_lists.forEach(function(s){
|
||||||
if(data[s] == null){
|
if(data[s] == null){
|
||||||
return
|
return
|
||||||
|
|||||||
@ -139,11 +139,20 @@ module.getLatestUpdaterVersion = function(){
|
|||||||
// format.
|
// format.
|
||||||
// NOTE: if data is already in the latest format this will return it
|
// NOTE: if data is already in the latest format this will return it
|
||||||
// as-is.
|
// as-is.
|
||||||
module.updateData = function(data){
|
module.updateData = function(data, clean){
|
||||||
var v = module.getLatestUpdaterVersion()
|
var v = module.getLatestUpdaterVersion()
|
||||||
return data.version < v
|
var res = data.version < v
|
||||||
? module.VERSIONS[v](data)
|
? module.VERSIONS[v](data)
|
||||||
: 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