[Users] Slider opacity right mouse click

Vidal, Antoni antoni.vidal at icc.cat
Tue Oct 4 10:47:10 CEST 2011


Hi,

 

Where I can get code and documentation for contextmenuplugin?

 

Thanks.

 

Toni

 

De: users-bounces at geoext.org [mailto:users-bounces at geoext.org] En nom de
Phil Scadden
Enviat: lunes, 03 de octubre de 2011 23:01
Per a: users at geoext.org
Tema: Re: [Users] Slider opacity right mouse click

 





In mapfish applications it was the possibility to get an slider control
to change opacity in layer tree, just right click over layer name's.
This bahaviour is very interesting for me, but i'm not idea how can I
reproduce it in geoext 1.0 application.

 

I added it to the layertreebuilder ux (Alexander Dube excellent
creation) using the contextmenuplugin,
viz this edit to LayerTreeBuilder.js

initComponent: function(){
        this.addEvents(this.CUSTOM_EVENTS);

        this.plugins = this.plugins || [];
        this.plugins.push({ptype: "gx_treenodecomponent"});
        this.plugins.push(new
GeoExt.ux.plugins.LayerTreeBuilderNodeAgent());
        this.plugins.push(new GeoExt.tree.ContextMenuPlugin({ 
            sliderOptions:{
                  aggressive: true,
                  plugins: new GeoExt.LayerOpacitySliderTip()
                 }
            })
       );   
 
GeoExt.ux.tree.LayerTreeBuilder.superclass.initComponent.call(this);
        if(!this.layerStore) {
            this.layerStore = GeoExt.MapPanel.guess().layers;
        }

        this.layerStore.on({
            "add": this.onLayerAdded,
            "remove": this.onLayerRemoved,
            scope: this
        });

        this.layerStore.treeBuilder = this;
    },

See http://kite.gns.cri.nz/PBE/index.html#MAP:OPAConfig.json for example
in action.

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.

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20111004/31eb7c85/attachment.htm 


More information about the Users mailing list