Commit afc8fdbf1fc45d153d2170eb998e1517593d4556
1 parent
458fb0ef
Exists in
master
and in
7 other branches
Incluida a propriedade ATIVA em classe_barradebotoes.js que permite iniciar o ma…
…pa com ou sem a barra de botões ativada
Showing
3 changed files
with
46 additions
and
6 deletions
Show diff stats
classesjs/classe_barradebotoes.js
... | ... | @@ -41,6 +41,18 @@ Veja também classe_interface.js (i3GEO.Interface) que possuí parâmetros que perm |
41 | 41 | */ |
42 | 42 | i3GEO.barraDeBotoes = { |
43 | 43 | /* |
44 | + Propriedade: ATIVA | |
45 | + | |
46 | + Indica se a barra de botões será ou não cosntruída automaticamente no processo de inicialização do mapa. | |
47 | + | |
48 | + Tipo: | |
49 | + {boolean} | |
50 | + | |
51 | + Default: | |
52 | + {true} | |
53 | + */ | |
54 | + ATIVA: true, | |
55 | + /* | |
44 | 56 | Propriedade: TIPO |
45 | 57 | |
46 | 58 | Tipo de barra. |
... | ... | @@ -513,13 +525,15 @@ i3GEO.barraDeBotoes = { |
513 | 525 | Utilizado para restaurar o status padrão da barra, principalmente por ferramentas que alteram ícones e outras propriedades do mapa |
514 | 526 | */ |
515 | 527 | ativaPadrao: function(){ |
516 | - try{ | |
517 | - var botao = i3GEO.barraDeBotoes.defBotao(i3GEO.barraDeBotoes.BOTAOPADRAO); | |
518 | - if(botao.funcaoonclick){ | |
519 | - botao.funcaoonclick.call(); | |
528 | + if(i3GEO.barraDeBotoes.ATIVA === true){ | |
529 | + try{ | |
530 | + var botao = i3GEO.barraDeBotoes.defBotao(i3GEO.barraDeBotoes.BOTAOPADRAO); | |
531 | + if(botao.funcaoonclick){ | |
532 | + botao.funcaoonclick.call(); | |
533 | + } | |
520 | 534 | } |
535 | + catch(e){} | |
521 | 536 | } |
522 | - catch(e){} | |
523 | 537 | }, |
524 | 538 | /* |
525 | 539 | Function: ativaIcone |
... | ... | @@ -535,6 +549,9 @@ i3GEO.barraDeBotoes = { |
535 | 549 | */ |
536 | 550 | ativaIcone: function(icone){ |
537 | 551 | if(typeof(console) !== 'undefined'){console.info("i3GEO.barraDeBotoes.ativaIcone()");} |
552 | + if(i3GEO.barraDeBotoes.ATIVA === false){ | |
553 | + return; | |
554 | + } | |
538 | 555 | // |
539 | 556 | //desativa a função de zoom por box nativa do OpenLayers |
540 | 557 | // |
... | ... | @@ -650,6 +667,9 @@ i3GEO.barraDeBotoes = { |
650 | 667 | */ |
651 | 668 | ativaBotoes:function(padrao){ |
652 | 669 | if(typeof(console) !== 'undefined'){console.info("i3GEO.barraDeBotoes.ativaBotoes()");} |
670 | + if(i3GEO.barraDeBotoes.ATIVA === false){ | |
671 | + return; | |
672 | + } | |
653 | 673 | var l,b,temp; |
654 | 674 | if(arguments.length === 0) |
655 | 675 | {padrao = this.BOTAOPADRAO;} |
... | ... | @@ -697,6 +717,9 @@ i3GEO.barraDeBotoes = { |
697 | 717 | y {numeric} - (opcional) posição em pixels da tela onde foi feito o clique do mouse |
698 | 718 | */ |
699 | 719 | execBotao: function(id,x,y,posX,posY){ |
720 | + if(i3GEO.barraDeBotoes.ATIVA === false){ | |
721 | + return; | |
722 | + } | |
700 | 723 | var temp, |
701 | 724 | botao = i3GEO.barraDeBotoes.defBotao(id); |
702 | 725 | i3GEO.barraDeBotoes.BOTAOCLICADO = id; |
... | ... | @@ -752,6 +775,9 @@ i3GEO.barraDeBotoes = { |
752 | 775 | |
753 | 776 | */ |
754 | 777 | inicializaBarraOP: function(){ |
778 | + if(i3GEO.barraDeBotoes.ATIVA === false){ | |
779 | + return; | |
780 | + } | |
755 | 781 | i3GEO.barraDeBotoes.AJUDA = false; |
756 | 782 | euEnv.imageBasePath=i3GEO.configura.locaplic+"/pacotes/eudock/"; |
757 | 783 | var botao, |
... | ... | @@ -902,6 +928,9 @@ i3GEO.barraDeBotoes = { |
902 | 928 | onde {String} - (opcional) id do elemento HTML onde os botões serão inseridos |
903 | 929 | */ |
904 | 930 | inicializaBarra:function(idconteudo,idconteudonovo,barraZoom,x,y,onde){ |
931 | + if(i3GEO.barraDeBotoes.ATIVA === false){ | |
932 | + return; | |
933 | + } | |
905 | 934 | if(typeof(console) !== 'undefined'){console.info("i3GEO.barraDeBotoes.inicializaBarra()");} |
906 | 935 | if (i3GEO.configura.map3d === "") |
907 | 936 | {i3GEO.barraDeBotoes.INCLUIBOTAO.v3d = false;} |
... | ... | @@ -1167,6 +1196,9 @@ i3GEO.barraDeBotoes = { |
1167 | 1196 | idbarra - {string} id da barra de botões onde o evento será ativado |
1168 | 1197 | */ |
1169 | 1198 | ativaMenuContexto: function(idbarra){ |
1199 | + if(i3GEO.barraDeBotoes.ATIVA === false){ | |
1200 | + return; | |
1201 | + } | |
1170 | 1202 | if(typeof(console) !== 'undefined'){console.info("i3GEO.barraDeBotoes.ativaMenuContexto()");} |
1171 | 1203 | var oFieldContextMenuItemData,oFieldContextMenu,onFieldMenuRender; |
1172 | 1204 | function executar(a,b,c) |
... | ... | @@ -1207,6 +1239,9 @@ i3GEO.barraDeBotoes = { |
1207 | 1239 | as barras Se não for definido, todas as barras serão reativadas |
1208 | 1240 | */ |
1209 | 1241 | reativa: function(indice){ |
1242 | + if(i3GEO.barraDeBotoes.ATIVA === false){ | |
1243 | + return; | |
1244 | + } | |
1210 | 1245 | if(typeof(console) !== 'undefined'){console.info("i3GEO.barraDeBotoes.reativa()");} |
1211 | 1246 | var abre = function(){ |
1212 | 1247 | var i, |
... | ... | @@ -1235,6 +1270,9 @@ i3GEO.barraDeBotoes = { |
1235 | 1270 | id {String} - id da barra |
1236 | 1271 | */ |
1237 | 1272 | recria: function(id){ |
1273 | + if(i3GEO.barraDeBotoes.ATIVA === false){ | |
1274 | + return; | |
1275 | + } | |
1238 | 1276 | if(typeof(console) !== 'undefined'){console.info("i3GEO.barraDeBotoes.recria()");} |
1239 | 1277 | if(i3GEO.barraDeBotoes.TIPO === "olhodepeixe"){ |
1240 | 1278 | euEnv.euDockArray = []; | ... | ... |
classesjs/classe_gadgets.js
interface/openlayers.htm
... | ... | @@ -198,6 +198,8 @@ i3GEO.barraDeBotoes.OFFSET = -3; |
198 | 198 | //i3GEO.barraDeBotoes.MAXBOTOES = 10; |
199 | 199 | //remove itens dos menus que não são necessários, já que estão como ícones na barra de botões |
200 | 200 | i3GEO.configura.oMenuData["submenus"]["janelas"] = []; |
201 | +//a barra de botões será mostrada no mapa conforme o construtor padrão | |
202 | +i3GEO.barraDeBotoes.ATIVA = true; | |
201 | 203 | // |
202 | 204 | //barra de botoes normal. descomente para usar |
203 | 205 | /* | ... | ... |