Commit 29bfb37c460780e1d0d7dcd897594c39e5f27063

Authored by Edmar Moretti
1 parent d6ae9ade

Inclusão de propriedade para definição da posição das barras de botões

Showing 1 changed file with 27 additions and 11 deletions   Show diff stats
classesjs/classe_interface.js
... ... @@ -42,6 +42,25 @@ O HTML deve conter as definições da interface criada e deve estar armazenado em
42 42 */
43 43 i3GEO.interface = {
44 44 /*
  45 + Property: BARRABOTOESTOP
  46 +
  47 + Distância da barra de botões em ralação ao topo do mapa.
  48 +
  49 + Type:
  50 + {number}
  51 + */
  52 + BARRABOTOESTOP: 12,
  53 + /*
  54 + Property: BARRABOTOESLEFT
  55 +
  56 + Distância da barra de botões em ralação ao lado esquerdo do mapa.
  57 +
  58 + Type:
  59 + {number}
  60 + */
  61 + BARRABOTOESLEFT: 3,
  62 +
  63 + /*
45 64 Property: ATUAL
46 65  
47 66 Interface atual em uso.
... ... @@ -189,18 +208,15 @@ i3GEO.interface = {
189 208 ativaBotoes: function(){
190 209 var imagemxy = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.interface.IDCORPO));
191 210 if ($i("barraDeBotoes1")){
192   - var x1 = imagemxy[0]+40;
193   - var y1 = imagemxy[1]+10;
  211 + var x1 = imagemxy[0]+i3GEO.interface.BARRABOTOESLEFT;
  212 + var y1 = imagemxy[1]+i3GEO.interface.BARRABOTOESTOP;
194 213 }
195 214 if ($i("barraDeBotoes2")){
196   - var x2 = imagemxy[0];
197   - var y2 = imagemxy[1]+10;
  215 + var x2 = imagemxy[0]+i3GEO.interface.BARRABOTOESLEFT;
  216 + var y2 = imagemxy[1]+i3GEO.interface.BARRABOTOESTOP;
198 217 }
199   - else{
200   - if ($i("barraDeBotoes1")){
201   - var x1 = imagemxy[0];
202   - var x2 = imagemxy[1]+10;
203   - }
  218 + if ($i("barraDeBotoes1") && $i("barraDeBotoes2")){
  219 + var x1 = imagemxy[0]+i3GEO.interface.BARRABOTOESLEFT+40;
204 220 }
205 221 if ($i("barraDeBotoes1"))
206 222 i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes1","i3geo_barra1",true,x1,y1);
... ... @@ -571,8 +587,8 @@ i3GEO.interface = {
571 587 ativaBotoes: function(){
572 588 var imagemxy = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.interface.IDCORPO));
573 589 if ($i("barraDeBotoes2")){
574   - var x2 = imagemxy[0]+80;
575   - var y2 = imagemxy[1]+10;
  590 + var x2 = imagemxy[0]+i3GEO.interface.BARRABOTOESLEFT;
  591 + var y2 = imagemxy[1]+i3GEO.interface.BARRABOTOESTOP;
576 592 }
577 593 if ($i("barraDeBotoes2"))
578 594 i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2);
... ...