Commit 29bfb37c460780e1d0d7dcd897594c39e5f27063
1 parent
d6ae9ade
Exists in
master
and in
7 other branches
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,6 +42,25 @@ O HTML deve conter as definições da interface criada e deve estar armazenado em | ||
| 42 | */ | 42 | */ |
| 43 | i3GEO.interface = { | 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 | Property: ATUAL | 64 | Property: ATUAL |
| 46 | 65 | ||
| 47 | Interface atual em uso. | 66 | Interface atual em uso. |
| @@ -189,18 +208,15 @@ i3GEO.interface = { | @@ -189,18 +208,15 @@ i3GEO.interface = { | ||
| 189 | ativaBotoes: function(){ | 208 | ativaBotoes: function(){ |
| 190 | var imagemxy = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.interface.IDCORPO)); | 209 | var imagemxy = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.interface.IDCORPO)); |
| 191 | if ($i("barraDeBotoes1")){ | 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 | if ($i("barraDeBotoes2")){ | 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 | if ($i("barraDeBotoes1")) | 221 | if ($i("barraDeBotoes1")) |
| 206 | i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes1","i3geo_barra1",true,x1,y1); | 222 | i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes1","i3geo_barra1",true,x1,y1); |
| @@ -571,8 +587,8 @@ i3GEO.interface = { | @@ -571,8 +587,8 @@ i3GEO.interface = { | ||
| 571 | ativaBotoes: function(){ | 587 | ativaBotoes: function(){ |
| 572 | var imagemxy = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.interface.IDCORPO)); | 588 | var imagemxy = i3GEO.util.pegaPosicaoObjeto($i(i3GEO.interface.IDCORPO)); |
| 573 | if ($i("barraDeBotoes2")){ | 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 | if ($i("barraDeBotoes2")) | 593 | if ($i("barraDeBotoes2")) |
| 578 | i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2); | 594 | i3GEO.barraDeBotoes.inicializaBarra("barraDeBotoes2","i3geo_barra2",false,x2,y2); |