mirror of
https://github.com/flynx/ImageGrid.git
synced 2025-11-03 12:50:09 +00:00
updated todo and some cleaning...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
fbeea05cef
commit
9a9fa74ecb
17
ui/TODO.otl
17
ui/TODO.otl
@ -91,8 +91,8 @@ Roadmap
|
||||
|
||||
|
||||
|
||||
[_] 28% Gen 3 current todo
|
||||
[_] 57% High priority
|
||||
[_] 29% Gen 3 current todo
|
||||
[_] 58% High priority
|
||||
[_] BUG: align problems are back...
|
||||
| default data set (browser/images.js) same images #4 (going
|
||||
| from right) & #5 (going from left) of 18 in the first ribbon
|
||||
@ -104,11 +104,11 @@ Roadmap
|
||||
| misaligned, at "max" #2 and #5 are affected...
|
||||
|
|
||||
| centerView() fixes this, but only for the current image...
|
||||
[_] 0% BUG: sometimes the previews are not updated...
|
||||
[_] 50% BUG: sometimes the previews are not updated...
|
||||
[_] wrong resolution preview is loaded
|
||||
| when coming out of single-image-mode after moving to a
|
||||
| different position (so as ribbons go reloaded)
|
||||
[_] previews do not get replaced at all, e.g. everything
|
||||
[X] previews do not get replaced at all, e.g. everything
|
||||
| behaves correctly (order, etc.) but the previews are
|
||||
| from wrong (ones before re-attaching) images
|
||||
| (this I can't repeat at this point)
|
||||
@ -128,6 +128,15 @@ Roadmap
|
||||
| know.
|
||||
| - slowing down the browser appears to make this happen
|
||||
| less often, is this a race condition?
|
||||
|
|
||||
| Might be caused by fast sequential updating/reloading of an image:
|
||||
| - call the updateImage(...) in order several times
|
||||
| - cache .onload events get called in order of images loading
|
||||
| not in order of updateImage(...) calls...
|
||||
| (this cause is not confirmed)
|
||||
|
|
||||
| Apparently fixed by storing the preview URL in image.data(), this
|
||||
| is slower but avoids problems with multiple updates and races...
|
||||
[_] 60% basic dialogs
|
||||
[_] select from list
|
||||
[X] alert
|
||||
|
||||
11
ui/data.js
11
ui/data.js
@ -740,12 +740,12 @@ function updateImage(image, gid, size){
|
||||
}
|
||||
|
||||
// preview...
|
||||
// NOTE: pre-caching the url directly instead of referencing it from
|
||||
// the result object (preview.url) appears to fix a problem of
|
||||
// wrong references in the closure of the .onload callback below,
|
||||
// that sometimes (can't reproduce in a simpler setting) resulted
|
||||
// in wrong images loading...
|
||||
var p_url = getBestPreview(gid, size).url
|
||||
// NOTE: due to the fact that loading/caching the image might be at
|
||||
// a different pace than calling updateImage(...) and .onload
|
||||
// events may trigger in any sequence, we need to update the
|
||||
// url in a persistent way so as to load the last call's image
|
||||
// regardless of actual handler call sequence...
|
||||
image.data().loading = p_url
|
||||
|
||||
// pre-cache and load image...
|
||||
@ -753,7 +753,6 @@ function updateImage(image, gid, size){
|
||||
var img = new Image()
|
||||
img.onload = function(){
|
||||
image.css({
|
||||
//'background-image': 'url("'+ p_url +'")',
|
||||
'background-image': 'url("'+ image.data().loading +'")',
|
||||
})
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user