pcirella / dynatree

Automatically exported from code.google.com/p/dynatree
0 stars 0 forks source link

Images loading late with initAjax #143

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I've first implemented the tree with <ul>/<il> which works slow but fine.

changed everything to json and loading with initAjax does the job, but 
there seems to be an issue when the skin images are loaded (see pic 
attached):

- Site starts showing the DialogUI (1)
- after 'success' of 'initAjax', the DialogUI is closed (2) and the tree 
is shown (3) -> Images are missing
- ca. five seconds later, the images show up (4)

I think the problem is, that 'success' should only be fired AFTER the 
images and everything is loaded. Also tried 'onPostInit'. Same problem 
(and onPostInit has still this open issue, that its crashing when used 
together with Ajax's "error: function..." - or "success:...").

working with dynatree v0.5.3 rev313 and the problem occrus in FF 3.6.2. 
the problem does not occur in IE7 (cant check with IE8). 

Keep it up :-)
G

Original issue reported on code.google.com by ggerr...@gmail.com on 21 Apr 2010 at 7:40

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by moo...@wwwendt.de on 21 Nov 2010 at 7:22

GoogleCodeExporter commented 9 years ago
There are a lot of plugins that handle image preloading.

This sample uses jQuery.Preload plugin by Ariel Flesler 
(http://flesler.blogspot.com/2008/01/jquerypreload.html):

http://code.google.com/p/dynatree/source/browse/trunk/doc/test-preload.html

Still looking for some ideas if and how this could be integrated into Dynatree 
core.

Original comment by moo...@wwwendt.de on 21 Nov 2010 at 6:12

GoogleCodeExporter commented 9 years ago
How about using CSS sprites?

Just like how the jQuery-UI Themes-images are stored in ui-icons_*.png files?

Original comment by prana001 on 21 Nov 2010 at 6:39

GoogleCodeExporter commented 9 years ago
I played with that a few weeks ago, but was too lazy to finish.
Some of the icons (with v-lines) rely on repeating, but it should be possible 
to design a skin that uses this technique...

Original comment by moo...@wwwendt.de on 22 Nov 2010 at 7:34

GoogleCodeExporter commented 9 years ago

Original comment by moo...@wwwendt.de on 8 Dec 2010 at 6:51

GoogleCodeExporter commented 9 years ago
Added CSS sprite skins (and using it by default)

Original comment by moo...@wwwendt.de on 11 Dec 2010 at 7:47

GoogleCodeExporter commented 9 years ago

Original comment by moo...@wwwendt.de on 12 Dec 2010 at 8:41

GoogleCodeExporter commented 9 years ago
considered verified

Original comment by moo...@wwwendt.de on 17 Jul 2012 at 4:16

GoogleCodeExporter commented 9 years ago

Original comment by moo...@wwwendt.de on 17 Jul 2012 at 4:19