[Users] Contextmenu plugin??

Adam Ratcliffe adam at prema.co.nz
Thu Jun 30 03:31:06 CEST 2011


Hi Phil,

You can add a 'contextmenu' listener to your LayerTree and use that to display a regular ExtJS menu e.g.

    layerContextMenuHandler: function(node, e) {
        var layer = node.layer,
	tree = node.getOwnerTree();

        e.stopEvent();
            
        tree.selectPath(node.getPath());
        this.layerContextMenu.layer = layer;
        this.layerContextMenu.showAt(e.getXY());
    }

Is that the kind of thing you're looking for?

Cheers
Adam

On 30/06/2011, at 12:07 PM, Phil Scadden wrote:

> I am badly needing to add an opacity slider function to some layers in a 
> tree (layertreebuilder). There was message in March showing mods to 
> layertreebuilder for doing this but it included a "ContextMenuPlugin". I 
> cant find such a thing even in the latest trunk. Can anyone shed some 
> light here please?
> 
> -- 
> Phil Scadden, GNS Science Ltd 764 Cumberland St, Private Bag 1930, 
> Dunedin, New Zealand Ph +64 3 4799663, fax +64 3 477 5232
> 
> 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



More information about the Users mailing list