<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Text de globus Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.TextdeglobusCar
        {mso-style-name:"Text de globus Car";
        mso-style-priority:99;
        mso-style-link:"Text de globus";
        font-family:"Tahoma","sans-serif";}
p.Sprechblasentext, li.Sprechblasentext, div.Sprechblasentext
        {mso-style-name:Sprechblasentext;
        mso-style-link:"Sprechblasentext Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
span.SprechblasentextZchn
        {mso-style-name:"Sprechblasentext Zchn";
        mso-style-priority:99;
        mso-style-link:Sprechblasentext;
        font-family:"Tahoma","sans-serif";}
span.EstilCorreuElectrnic21
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.EstilCorreuElectrnic22
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EstilCorreuElectrnic23
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EstilCorreuElectrnic24
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=CA link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>Hello Lucia,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>I’m interested in adding the OpacitySlider to every layer in treepanel. I’ve tryed to follow your steps, but I didn’t get LayerTreeBuilder.js in my geoext installation !!.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Have you an oline example?<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Thank’s a lot.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#0D0D0D'>Antoni Vidal</span></b><span style='color:#0D0D0D'><o:p></o:p></span></p><p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:gray'>Unitat d'Aplicacions SIG-WEB<br><a href="http://mercuri.icc.cat/website/mob_nf/mob1/mob2/inici2.htm?CONSULTA=Institut%20Cartogr%25E0fic%20de%20Catalunya&XYADDRESS=429486:4580392"><span style='color:gray'>Institut Cartogrāfic de Catalunya</span></a><br>Parc de Montjuīc, E-08038 Barcelona<br>Tel. (+34) 93 567 15 00 (ext. 3228)<br><a href="http://www.icc.cat/">www.icc.cat</a></span><span style='color:#1F497D'><o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>De:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> users-bounces@geoext.org [mailto:users-bounces@geoext.org] <b>En nom de </b>Morper-Busch, Lucia<br><b>Enviat:</b> miércoles, 30 de marzo de 2011 12:02<br><b>Per a:</b> users@geoext.org<br><b>Tema:</b> Re: [Users] OpacitySlider for each Layer in aLayerTree(LayerTreeBuilder)<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Hello GeoExt users, <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>after long searching for a solution I found the <b>OpacitySliderPlugin</b>, now renamed to <b>ContextMenuPlugin</b> to integrate into the LayerTree.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>I inserted the <b>ContextMenuPlugin</b> with a <b>LayerOpacitySliderTip</b>-Plugin in the LayerTreeBuilder.js and now it does what I want: <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Code snippet of LayerTreeBuilder.js:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:black'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New"'>initComponent: function(){<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New"'> this.addEvents(this.CUSTOM_EVENTS);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New"'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New"'> this.plugins = this.plugins || [];<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New"'> this.plugins.push({ptype: "gx_treenodecomponent"});<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New"'> this.plugins.push(new GeoExt.ux.plugins.LayerTreeBuilderNodeAgent());<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:red'> //Context menu with opacity slider, added by Lucia:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:red'> this.plugins.push(new GeoExt.tree.ContextMenuPlugin({ <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:red'> sliderOptions:{<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:red'> aggressive: true,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:red'> plugins: new GeoExt.LayerOpacitySliderTip()<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:red'> }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:red'> })<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New";color:red'> ); </span><span lang=EN-US style='font-family:"Courier New"'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New"'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New"'> GeoExt.ux.tree.LayerTreeBuilder.superclass.initComponent.call(this);<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New"'> if(!this.layerStore) {<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New"'> this.layerStore = GeoExt.MapPanel.guess().layers;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New"'> }<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New"'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New"'> this.layerStore.on({<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New"'> "add": this.onLayerAdded,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New"'> "remove": this.onLayerRemoved,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New"'> scope: this<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New"'> });<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New"'> <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New"'> this.layerStore.treeBuilder = this;<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-family:"Courier New"'>},<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><u><span lang=EN-US style='color:#1F497D'>Three remarks: <o:p></o:p></span></u></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>1. It’s hard to find new developments. I’m searching always with key words like “opacity slider” “layertree” and similar. In my opinion there is a lack of finding the latest improvements. The code examples are not linked to these key words, isn’t it?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>2.It would be nice for a <b>boolean option</b> of the <b>LayerTreeBuilder</b> to set “ContextMenu: true/false”, without manipulating the code of the LayerTreeBuilder.js itself. Maybe also with <b>SliderOptions</b> for a possible integrating of the very useful <b>LayerOpacitySliderTip</b>.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>3. There is a Error executing the new code: <b>"this.dom.style is null or not an object"</b> referring to ext-all.js.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Does anybody know how to fix it?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Thanks<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'>Lucia<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='color:#1F497D'><o:p> </o:p></span></p><div><p class=MsoNormal style='margin-bottom:1.0pt'><b><span lang=EN-US style='font-size:8.0pt;font-family:"Verdana","sans-serif";color:#365F91'>Dipl.-Geogr. Lucia Morper-Busch</span></b><b><span lang=EN-US style='font-size:8.0pt;font-family:"Verdana","sans-serif";color:#1F497D'> | </span></b><b><span lang=EN-US style='font-size:8.0pt;font-family:"Verdana","sans-serif";color:#C00000'>Researcher</span></b><b><span lang=EN-US style='font-size:8.0pt;font-family:"Verdana","sans-serif";color:#1F497D'><o:p></o:p></span></b></p><p class=MsoNormal style='margin-bottom:1.0pt'><span lang=EN-US style='font-size:8.0pt;font-family:"Verdana","sans-serif";color:gray'>University of Salzburg | Centre for Geoinformatics - Z_GIS<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:1.0pt'><span lang=EN-US style='font-size:8.0pt;font-family:"Verdana","sans-serif";color:gray'>Schillerstr.30 | Techno-Z, Block 15, 3rd floor | 5020 Salzburg, Austria<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:8.0pt;font-family:"Verdana","sans-serif";color:gray'>Phone +43 (0)662 8044 5298 | Fax +43 (0)662 8044 5260<o:p></o:p></span></p><p class=MsoNormal><b><i><span lang=EN-US style='font-size:8.0pt;font-family:"Verdana","sans-serif";color:gray'>> <a href="http://www.zgis.at/research"><span style='color:gray;text-decoration:none'>Z_GIS…experts for the spatial view</span></a><o:p></o:p></span></i></b></p></div><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=DE style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>Von:</span></b><span lang=DE style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> users-bounces@geoext.org [mailto:users-bounces@geoext.org] <b>Im Auftrag von </b>Morper-Busch, Lucia<br><b>Gesendet:</b> Dienstag, 29. März 2011 15:06<br><b>An:</b> users@geoext.org<br><b>Betreff:</b> [Users] OpacitySlider for each Layer in a LayerTree(LayerTreeBuilder)<o:p></o:p></span></p></div></div><p class=MsoNormal><span lang=DE-AT><o:p> </o:p></span></p><p class=MsoNormal><span lang=EN-US>Hi GeoExt users,<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>I have a second question:<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Do anybody know how to combine LayerTreeBuilder with a OpacitySlider for each visible layer in the tree?<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>I managed only either legend or OpacitySlider, but I want both!<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Thank you<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US>Lucia<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p><p class=MsoNormal style='margin-bottom:1.0pt'><b><span lang=EN-US style='font-size:8.0pt;font-family:"Verdana","sans-serif";color:#365F91'>Dipl.-Geogr. Lucia Morper-Busch</span></b><b><span lang=EN-US style='font-size:8.0pt;font-family:"Verdana","sans-serif";color:#1F497D'> | </span></b><b><span lang=EN-US style='font-size:8.0pt;font-family:"Verdana","sans-serif";color:#C00000'>Researcher</span></b><b><span lang=EN-US style='font-size:8.0pt;font-family:"Verdana","sans-serif";color:#1F497D'><o:p></o:p></span></b></p><p class=MsoNormal style='margin-bottom:1.0pt'><span lang=EN-US style='font-size:8.0pt;font-family:"Verdana","sans-serif";color:gray'>University of Salzburg | Centre for Geoinformatics - Z_GIS<o:p></o:p></span></p><p class=MsoNormal style='margin-bottom:1.0pt'><span lang=EN-US style='font-size:8.0pt;font-family:"Verdana","sans-serif";color:gray'>Schillerstr.30 | Techno-Z, Block 15, 3rd floor | 5020 Salzburg, Austria<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:8.0pt;font-family:"Verdana","sans-serif";color:gray'>Phone +43 (0)662 8044 5298 | Fax +43 (0)662 8044 5260<o:p></o:p></span></p><p class=MsoNormal><b><i><span lang=EN-US style='font-size:8.0pt;font-family:"Verdana","sans-serif";color:gray'>> <a href="http://www.zgis.at/research"><span style='color:gray;text-decoration:none'>Z_GIS…experts for the spatial view</span></a><o:p></o:p></span></i></b></p><p class=MsoNormal><span lang=EN-US><o:p> </o:p></span></p></div></body></html>