[Users] Contextmenu plugin??
Vidal, Antoni
antoni.vidal at icc.cat
Tue Oct 4 16:28:35 CEST 2011
Hi,
I've tryed to add ContextMenuPlugin to LayerNode.js in order to get right click options in a layer tree created using xtype "treepanel". I've added ContextMenuPlugin.js and made changes in LayerNode.js constructor function.
It doesn't work, but I didn't get error. Maybe I don't use required params in layer definition, but I think yes. The only one that I'm not using is "group" because I'm using LayerTreeBuilder.
Any suggestion would be appreciatted,
Toni.
-----Missatge original-----
De: users-bounces at geoext.org [mailto:users-bounces at geoext.org] En nom de Alexandre Dube
Enviat: jueves, 30 de junio de 2011 14:30
Per a: users at geoext.org
Tema: Re: [Users] Contextmenu plugin??
********************* IMPORTANT ! *****************************
** eSafe ha trobat contingut potencialment hostil o malicis.
** Per a la seva protecci, S'ha modificat aquest missatge i
** s'ha eliminat el contingut perills
***************************************************************
\ContextMenuPlugin.js Msg #705 - The file type js is on the Restricted List.
Hello,
Here's one ContextMenuPlugin I used in a project a while ago to delete or change the opacity of a layer. The items of the context menu appear only if the layer has the required parameters (see in code). Edit it as you feel.
Adding it as a plugin of the LayerTreeBuilder should work.
Since this kind of menu is kinda too "user-customizable", I hesitated in adding it in the LayerTreeBuilder repository, but I guess it wouldn't hurt to have something generic. If you want to work on that, you're welcome to send a patch.
Kind regards,
Alexandre
On 11-06-30 02:29 AM, gbrun wrote:
> Maybe you can can find something interesting here:
> http://opengeo.github.com/gxp/lib/plugins/LayerTree.html
>
> I know, it isn't the classical GeoExt library, but it should work with it.
> I didn't try it, but it seems to answer your needs!
>
> Geoffrey
>
>
> On Thu, 30 Jun 2011 04:24:41 +0200, Adam Ratcliffe<adam at prema.co.nz>
> wrote:
>
>> Sorry Phil, haven't had any experience with that plugin in particular.
>>
>> Cheers
>> Adam
>>
>> On 30/06/2011, at 2:16 PM, Phil Scadden wrote:
>>
>>> The messages in question are
>>> http://www.geoext.org/pipermail/users/2011-March/002140.html
>>>
>>> and the code of concern is:
>>>
>>> this.plugins.push(new GeoExt.tree.ContextMenuPlugin({
>>> sliderOptions:{
>>> aggressive: true,
>>> plugins: new GeoExt.LayerOpacitySliderTip()
>>> }
>>> })
>>> );
>>>
>>>
>>>
>>> Notice: This email and any attachments are confidential. If received
>>> in error please destroy and immediately notify us. Do not copy or
>>> disclose the contents.
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at geoext.org
>>> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>> _______________________________________________
>> Users mailing list
>> Users at geoext.org
>> http://www.geoext.org/cgi-bin/mailman/listinfo/users
>
--
Alexandre Dubé
Mapgears
www.mapgears.com
More information about the Users
mailing list