Commit 88c17943e6171f0ef702a119f3a601a0661893fe

Authored by Edmar Moretti
1 parent 503f6099

Incluido botão trazer para frente no editor vetorial

classesjs/classe_barradebotoes.js
... ... @@ -1093,7 +1093,8 @@ i3GEO.barraDeBotoes = {
1093 1093 'ajuda':true,
1094 1094 'fecha':true,
1095 1095 'tools':true,
1096   - 'undo':true
  1096 + 'undo':true,
  1097 + 'frente':true
1097 1098 };
1098 1099 i3GEO.editorOL.layergrafico = new OpenLayers.Layer.Vector("Edição",{displayInLayerSwitcher:false,visibility:true});
1099 1100 i3GEO.editorOL.mapa.addLayers([i3GEO.editorOL.layergrafico]);
... ...
mashups/openlayers.css
... ... @@ -130,6 +130,12 @@ background-position:-522px -28px;
130 130 .olControlEditingToolbar1 .editorOLundoItemActive {
131 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 139 .olControlEditingToolbar1 {
134 140 width:600px;
135 141 float:right;
... ...
mashups/openlayers.js.php
... ... @@ -62,7 +62,8 @@ i3GEO.editorOL = {
62 62 'propriedades':true,
63 63 'fecha':false,
64 64 'tools':false,
65   - 'undo':false
  65 + 'undo':false,
  66 + 'frente':true
66 67 },
67 68 pontos: [],
68 69 marca: "../pacotes/openlayers/img/marker-gold.png",
... ... @@ -651,6 +652,15 @@ i3GEO.editorOL = {
651 652 controles.push(i3GEO.editorOL.ModifyFeature);
652 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 664 //só funciona dentro do i3geo
655 665 if(botoes.tools===true && i3GEO.php){
656 666 button = new OpenLayers.Control.Button({
... ... @@ -1096,5 +1106,17 @@ i3GEO.editorOL = {
1096 1106 },
1097 1107 carregajts: function(funcao){
1098 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 1123 \ No newline at end of file
... ...
mashups/openlayers.php
... ... @@ -80,7 +80,9 @@ if(isset($botoes)){
80 80 if(in_array("undo",$botoes))
81 81 {$objBotoes[] = "'undo':true";}
82 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 86 $botoes = "{".implode(",",$objBotoes)."}";
85 87 }
86 88  
... ... @@ -180,6 +182,7 @@ Parâmetros:
180 182 apaga
181 183 captura
182 184 procura
  185 + frente
183 186 propriedades
184 187 tools
185 188 undo
... ...
mashups/openlayers.png

21.9 KB | W: | H:

22.5 KB | W: | H:

  • 2-up
  • Swipe
  • Onion skin
mashups/openlayers_ajuda.php
... ... @@ -100,9 +100,13 @@ p,td
100 100 </tr>
101 101 <tr>
102 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 104 </tr>
105 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 110 <td style=width:20px ><div class="editorOLpropriedadesItemInactive"></div></td>
107 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 112 </tr>
... ...