mirror of
https://github.com/9001/copyparty.git
synced 2026-06-21 13:42:29 -06:00
fix bbox after load rework
This commit is contained in:
parent
ce4e70308a
commit
3a22949c8b
|
|
@ -1376,14 +1376,16 @@ window.baguetteBox = (function () {
|
||||||
|
|
||||||
|
|
||||||
function init(){
|
function init(){
|
||||||
if(thegrid != undefined && thegrid.dirty == false){
|
if(thegrid != undefined && thegrid.dirty == false && thegrid.bbox != true){
|
||||||
|
console.log('bbox load')
|
||||||
thegrid.bagit();
|
thegrid.bagit();
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
console.log('wait for grid init');
|
|
||||||
setTimeout(init, 100)
|
setTimeout(init, 100)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log('wait for grid init');
|
||||||
init();
|
init();
|
||||||
|
|
||||||
J_BBX = 2;
|
J_BBX = 2;
|
||||||
|
|
|
||||||
|
|
@ -4101,6 +4101,7 @@ function eval_hash() {
|
||||||
|
|
||||||
var media = scan_hash(v);
|
var media = scan_hash(v);
|
||||||
if (media) {
|
if (media) {
|
||||||
|
console.log('got media in hash')
|
||||||
var mtype = media[0],
|
var mtype = media[0],
|
||||||
id = media[1],
|
id = media[1],
|
||||||
ts = media[2];
|
ts = media[2];
|
||||||
|
|
@ -6514,7 +6515,7 @@ window.thegrid = (function () {
|
||||||
r.dirty = false;
|
r.dirty = false;
|
||||||
r.loadsel();
|
r.loadsel();
|
||||||
if(window.baguetteBox != undefined)
|
if(window.baguetteBox != undefined)
|
||||||
r.bagit('#ggrid');
|
r.bagit();
|
||||||
setTimeout(aligngriditems, 1);
|
setTimeout(aligngriditems, 1);
|
||||||
setTimeout(r.tippen, 20);
|
setTimeout(r.tippen, 20);
|
||||||
drag.initgrid();
|
drag.initgrid();
|
||||||
|
|
@ -6533,8 +6534,6 @@ window.thegrid = (function () {
|
||||||
|
|
||||||
r.bagit = function (isrc) {
|
r.bagit = function (isrc) {
|
||||||
console.log('init image viewer');
|
console.log('init image viewer');
|
||||||
if (!window.baguetteBox)
|
|
||||||
return;
|
|
||||||
|
|
||||||
if (r.bbox)
|
if (r.bbox)
|
||||||
baguetteBox.destroy();
|
baguetteBox.destroy();
|
||||||
|
|
@ -6563,6 +6562,7 @@ window.thegrid = (function () {
|
||||||
});
|
});
|
||||||
r.bbox_opts = br[1];
|
r.bbox_opts = br[1];
|
||||||
r.bbox = true;
|
r.bbox = true;
|
||||||
|
eval_hash()
|
||||||
};
|
};
|
||||||
|
|
||||||
r.onhide = function () {
|
r.onhide = function () {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue