Commit 88c17943e6171f0ef702a119f3a601a0661893fe
1 parent
503f6099
Exists in
master
and in
7 other branches
Incluido botão trazer para frente no editor vetorial
Showing
6 changed files
with
40 additions
and
4 deletions
Show diff stats
classesjs/classe_barradebotoes.js
@@ -1093,7 +1093,8 @@ i3GEO.barraDeBotoes = { | @@ -1093,7 +1093,8 @@ i3GEO.barraDeBotoes = { | ||
1093 | 'ajuda':true, | 1093 | 'ajuda':true, |
1094 | 'fecha':true, | 1094 | 'fecha':true, |
1095 | 'tools':true, | 1095 | 'tools':true, |
1096 | - 'undo':true | 1096 | + 'undo':true, |
1097 | + 'frente':true | ||
1097 | }; | 1098 | }; |
1098 | i3GEO.editorOL.layergrafico = new OpenLayers.Layer.Vector("Edição",{displayInLayerSwitcher:false,visibility:true}); | 1099 | i3GEO.editorOL.layergrafico = new OpenLayers.Layer.Vector("Edição",{displayInLayerSwitcher:false,visibility:true}); |
1099 | i3GEO.editorOL.mapa.addLayers([i3GEO.editorOL.layergrafico]); | 1100 | i3GEO.editorOL.mapa.addLayers([i3GEO.editorOL.layergrafico]); |
mashups/openlayers.css
@@ -130,6 +130,12 @@ background-position:-522px -28px; | @@ -130,6 +130,12 @@ background-position:-522px -28px; | ||
130 | .olControlEditingToolbar1 .editorOLundoItemActive { | 130 | .olControlEditingToolbar1 .editorOLundoItemActive { |
131 | background-position:-609px -28px; | 131 | background-position:-609px -28px; |
132 | } | 132 | } |
133 | +.olControlEditingToolbar1 .editorOLfrenteItemInactive { | ||
134 | + background-position:-638px 0; | ||
135 | +} | ||
136 | +.olControlEditingToolbar1 .editorOLfrenteItemActive { | ||
137 | + background-position:-638px -28px; | ||
138 | +} | ||
133 | .olControlEditingToolbar1 { | 139 | .olControlEditingToolbar1 { |
134 | width:600px; | 140 | width:600px; |
135 | float:right; | 141 | float:right; |
mashups/openlayers.js.php
@@ -62,7 +62,8 @@ i3GEO.editorOL = { | @@ -62,7 +62,8 @@ i3GEO.editorOL = { | ||
62 | 'propriedades':true, | 62 | 'propriedades':true, |
63 | 'fecha':false, | 63 | 'fecha':false, |
64 | 'tools':false, | 64 | 'tools':false, |
65 | - 'undo':false | 65 | + 'undo':false, |
66 | + 'frente':true | ||
66 | }, | 67 | }, |
67 | pontos: [], | 68 | pontos: [], |
68 | marca: "../pacotes/openlayers/img/marker-gold.png", | 69 | marca: "../pacotes/openlayers/img/marker-gold.png", |
@@ -651,6 +652,15 @@ i3GEO.editorOL = { | @@ -651,6 +652,15 @@ i3GEO.editorOL = { | ||
651 | controles.push(i3GEO.editorOL.ModifyFeature); | 652 | controles.push(i3GEO.editorOL.ModifyFeature); |
652 | adiciona = true; | 653 | adiciona = true; |
653 | } | 654 | } |
655 | + if(botoes.frente===true){ | ||
656 | + button = new OpenLayers.Control.Button({ | ||
657 | + displayClass: "editorOLfrente", | ||
658 | + trigger: function(){i3GEO.editorOL.trazParaFrente();}, | ||
659 | + title: "traz para frente" | ||
660 | + }); | ||
661 | + controles.push(button); | ||
662 | + adiciona = true; | ||
663 | + } | ||
654 | //só funciona dentro do i3geo | 664 | //só funciona dentro do i3geo |
655 | if(botoes.tools===true && i3GEO.php){ | 665 | if(botoes.tools===true && i3GEO.php){ |
656 | button = new OpenLayers.Control.Button({ | 666 | button = new OpenLayers.Control.Button({ |
@@ -1096,5 +1106,17 @@ i3GEO.editorOL = { | @@ -1096,5 +1106,17 @@ i3GEO.editorOL = { | ||
1096 | }, | 1106 | }, |
1097 | carregajts: function(funcao){ | 1107 | carregajts: function(funcao){ |
1098 | i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/pacotes/jsts/jstsi3geo.js",funcao,"i3GEOjts",true); | 1108 | i3GEO.util.scriptTag(i3GEO.configura.locaplic+"/pacotes/jsts/jstsi3geo.js",funcao,"i3GEOjts",true); |
1109 | + }, | ||
1110 | + trazParaFrente: function(){ | ||
1111 | + var features = i3GEO.editorOL.layergrafico.selectedFeatures; | ||
1112 | + if(features.length > 0){ | ||
1113 | + i3GEO.editorOL.backup = new OpenLayers.Layer.Vector("Backup",{displayInLayerSwitcher:false,visibility:false}) | ||
1114 | + i3GEO.editorOL.backup.addFeatures(features); | ||
1115 | + i3GEO.editorOL.unselTodos(); | ||
1116 | + i3GEO.editorOL.layergrafico.removeFeatures(features); | ||
1117 | + i3GEO.editorOL.layergrafico.addFeatures(i3GEO.editorOL.backup.features); | ||
1118 | + } | ||
1119 | + else | ||
1120 | + {alert("Selecione pelo menos um elemento");} | ||
1099 | } | 1121 | } |
1100 | }; | 1122 | }; |
1101 | \ No newline at end of file | 1123 | \ No newline at end of file |
mashups/openlayers.php
@@ -80,7 +80,9 @@ if(isset($botoes)){ | @@ -80,7 +80,9 @@ if(isset($botoes)){ | ||
80 | if(in_array("undo",$botoes)) | 80 | if(in_array("undo",$botoes)) |
81 | {$objBotoes[] = "'undo':true";} | 81 | {$objBotoes[] = "'undo':true";} |
82 | if(in_array("propriedades",$botoes)) | 82 | if(in_array("propriedades",$botoes)) |
83 | - {$objBotoes[] = "'propriedades':true";} | 83 | + {$objBotoes[] = "'propriedades':true";} |
84 | + if(in_array("frente",$botoes)) | ||
85 | + {$objBotoes[] = "'frente':true";} | ||
84 | $botoes = "{".implode(",",$objBotoes)."}"; | 86 | $botoes = "{".implode(",",$objBotoes)."}"; |
85 | } | 87 | } |
86 | 88 | ||
@@ -180,6 +182,7 @@ Parâmetros: | @@ -180,6 +182,7 @@ Parâmetros: | ||
180 | apaga | 182 | apaga |
181 | captura | 183 | captura |
182 | procura | 184 | procura |
185 | + frente | ||
183 | propriedades | 186 | propriedades |
184 | tools | 187 | tools |
185 | undo | 188 | undo |
mashups/openlayers.png
mashups/openlayers_ajuda.php
@@ -100,9 +100,13 @@ p,td | @@ -100,9 +100,13 @@ p,td | ||
100 | </tr> | 100 | </tr> |
101 | <tr> | 101 | <tr> |
102 | <td style=width:20px ><div class="editorOLsalvaItemInactive"></div></td> | 102 | <td style=width:20px ><div class="editorOLsalvaItemInactive"></div></td> |
103 | - <td>Salve ou obtenha as coordenadas das geometrias selecionadas.</td> | 103 | + <td>Converta para shapefile, salve ou obtenha as coordenadas das geometrias selecionadas.</td> |
104 | </tr> | 104 | </tr> |
105 | <tr> | 105 | <tr> |
106 | + <td style=width:20px ><div class="editorOLfrenteItemInactive"></div></td> | ||
107 | + <td>Traz a figura selecionada para a frente das demais.</td> | ||
108 | + </tr> | ||
109 | + <tr> | ||
106 | <td style=width:20px ><div class="editorOLpropriedadesItemInactive"></div></td> | 110 | <td style=width:20px ><div class="editorOLpropriedadesItemInactive"></div></td> |
107 | <td>Defina as propriedades de edição, como a distância de aproximação e outros comportamentos das operações. Defina também o comportamento da ferramenta de edição, permitindo alterar uma figura ou rotacioná-la, movê-la ou redimensionar.</td> | 111 | <td>Defina as propriedades de edição, como a distância de aproximação e outros comportamentos das operações. Defina também o comportamento da ferramenta de edição, permitindo alterar uma figura ou rotacioná-la, movê-la ou redimensionar.</td> |
108 | </tr> | 112 | </tr> |