[Users] TR: Enabling drag n drop in the Ext.tree.TreePanel(enableDD)
Valiquette,Francois [Montreal]
Francois.Valiquette at ec.gc.ca
Fri Feb 8 19:55:33 CET 2013
Hello Julien,
Thank you for your help, you almost remembered everything :)
The function you were talking about is in LayerLoader.js and it is onChildMove
I wrote up my own code since I manually create my own node. It was really simple. Next week, I will post my final function that will enable layers reordering between multiple WMS servers.
François
-----Message d'origine-----
De : users-bounces at geoext.org [mailto:users-bounces at geoext.org] De la part de Julien-Samuel Lacroix
Envoyé : 5 février 2013 14:36
À : users at geoext.org
Objet : Re: [Users] TR: Enabling drag n drop in the Ext.tree.TreePanel(enableDD)
Hello,
If I remember correctly, the LayerContainer class contains the code to
support the drag-drop. If you manually create the node, you have to add
the code by yourself. This is because the LayerContainer (and
sub-classes) know about other layers, but the node itself doesn't.
If I continue to remember correctly, there's an event thrown on the drop
(of the drag-drop), simply check your node order there and change your
map layer order accordingly.
I hope others can correct me if I'm wrong.
Julien
On 13-02-05 02:02 PM, Valiquette,Francois [Montreal] wrote:
> Hello,
>
> I am the original poster. I succeeded easily to change the drawing order
> of the layer with the drag and drop feature using a
> GeoExt.tree.LayerContainer. But I still cannot change the drawing order
> when I am manually creating my nodes (GeoExt.tree.LayerNode). By this, I
> mean, I can drag and drop but nothing happens.
>
> I will try to play a little bit more with my code....
>
> Thank you
>
> *De :*users-bounces at geoext.org [mailto:users-bounces at geoext.org] *De la
> part de* Valiquette,Francois [Montreal]
> *Envoyé :* 5 février 2013 12:31
> *À :* users at geoext.org
> *Objet :* [Users] Enabling drag n drop in the Ext.tree.TreePanel (enableDD)
>
> Hello,
>
> As written in
> http://www.geoext.org/tutorials/layertree-tutorial.html?highlight=drag,
> if I set /enableDD / to true of my TreePanel, it will enable layers
> reordering. Does it mean that the user can reorder layers in the
> TreePanel or does it mean that the user can reorder the display order in
> the the MapPanel to make a specific layer appear on top of another one?
>
> I tried to enableDD but when I drag and drop, the layer drawing order
> does not change. So I just want to if I missed something J
>
> Thank you
>
>
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>
--
Julien-Samuel Lacroix
Mapgears
http://www.mapgears.com/
_______________________________________________
Users mailing list
Users at geoext.org
http://www.geoext.org/cgi-bin/mailman/listinfo/users
More information about the Users
mailing list