camptocamp / cgxp

22 stars 22 forks source link

Timeslider and default expanded groups #1074

Closed kalbermattenm closed 8 years ago

kalbermattenm commented 8 years ago

We have a group, called "Mobilité", containing a layer with a timeslider :

img1

When expanding this one by clicking on "Mobilité" and "Réseau routier", you get the result hereunder, note that group "Trafic Journalier Moyen" is expanded by default (configuration in admin panel), so I did not click on it to expand it:

img2

The problem is that layer "Trafic 2002-2011" should show a timeslider...

Now if you collapse / expand again group "Trafic Journalier Moyen", then the timeslider is rendered (because of https://github.com/camptocamp/cgxp/blob/1.6/core/src/script/CGXP/widgets/tree/LayerTree.js#L442):

img3

img4

I think there is some kind of a bug here... The timeslider should be rendered even if its containing group is expanded by default.

I tried to play a bit with the event defined on line 442, but I could not find a way to resolve the bug...

Any hint ?

sbrunner commented 8 years ago

Is it possible to test it on a server? On witch theme are you?

kalbermattenm commented 8 years ago

http://sitn.ne.ch/dev_internet16/wsgi/theme/routes

I created a group "test_expand" which shows you the issue...:

-> timeslider appears...

sbrunner commented 8 years ago

On witch navigator / version?

sbrunner commented 8 years ago

I tested with Firefox and Chrome and it seam working ...

kalbermattenm commented 8 years ago

On Firefox 44, Chrome Version 48.0.2564.97 m

On Internet 11, the timeslider is even not rendered.... (something happens... but the timeslider is not viisble...)

And obviously on Windows 7....

FYI, do not activated the group / layer, just expand them using the little white/black arrows.

sbrunner commented 8 years ago

I read to fast, now I see it :-)

kalbermattenm commented 8 years ago

OK, cool ;-)

sbrunner commented 8 years ago

Does #1075 works well?

kalbermattenm commented 8 years ago

Yep, it does the job (even in IE11...) !

See http://sitn.ne.ch/dev_internet16/wsgi/theme/routes

sbrunner commented 8 years ago

Excellent :-), thanks!

kalbermattenm commented 8 years ago

Thank you @sbrunner ! ;-)