Commit c4e23848bb021b19b22190d22c60573a6e4e7e58
1 parent
ba1ef177
Exists in
master
and in
7 other branches
Inclusão de parâmetros na funcao de captura de pontos para indicar corretamente …
…quais elementos receberão as coordenadas capturadas.
Showing
2 changed files
with
30 additions
and
17 deletions
Show diff stats
classesjs/classe_eventos.js
... | ... | @@ -467,27 +467,40 @@ i3GEO.eventos = { |
467 | 467 | A janela aberta deve ter os seguintes elementos do tipo input (ids): |
468 | 468 | ixg,ixm,ixs,iyg,iym,iys |
469 | 469 | */ |
470 | - cliqueCapturaPt: function(){ | |
471 | - var x,y,doc; | |
472 | - if (g_tipoacao !== "capturaponto"){return;} | |
473 | - else{ | |
470 | + cliqueCapturaPt: function(ixg,ixm,ixs,iyg,iym,iys){ | |
471 | + if(arguments.length === 0){ | |
472 | + var ixg = "ixg", | |
473 | + ixm = "ixm", | |
474 | + ixs = "ixs", | |
475 | + iyg = "iyg", | |
476 | + iym = "iym", | |
477 | + iys = "iys", | |
478 | + x,y; | |
474 | 479 | if($i("wdocai")) |
475 | 480 | {doc = (navm) ? document.frames("wdocai").document : $i("wdocai").contentDocument;} |
481 | + } | |
482 | + else{ | |
483 | + var doc = document; | |
484 | + x, | |
485 | + y; | |
486 | + } | |
487 | + if (g_tipoacao !== "capturaponto"){return;} | |
488 | + else{ | |
476 | 489 | try{ |
477 | 490 | x = objposicaocursor.dmsx.split(" "); |
478 | 491 | y = objposicaocursor.dmsy.split(" "); |
479 | - if (doc.getElementById("ixg")) | |
480 | - {doc.getElementById("ixg").value = x[0];} | |
481 | - if (doc.getElementById("ixm")) | |
482 | - {doc.getElementById("ixm").value = x[1];} | |
483 | - if (doc.getElementById("ixs")) | |
484 | - {doc.getElementById("ixs").value = x[2];} | |
485 | - if (doc.getElementById("iyg")) | |
486 | - {doc.getElementById("iyg").value = y[0];} | |
487 | - if (doc.getElementById("iym")) | |
488 | - {doc.getElementById("iym").value = y[1];} | |
489 | - if (doc.getElementById("iys")) | |
490 | - {doc.getElementById("iys").value = y[2];} | |
492 | + if (doc.getElementById(ixg)) | |
493 | + {doc.getElementById(ixg).value = x[0];} | |
494 | + if (doc.getElementById(ixm)) | |
495 | + {doc.getElementById(ixm).value = x[1];} | |
496 | + if (doc.getElementById(ixs)) | |
497 | + {doc.getElementById(ixs).value = x[2];} | |
498 | + if (doc.getElementById(iyg)) | |
499 | + {doc.getElementById(iyg).value = y[0];} | |
500 | + if (doc.getElementById(iym)) | |
501 | + {doc.getElementById(iym).value = y[1];} | |
502 | + if (doc.getElementById(iys)) | |
503 | + {doc.getElementById(iys).value = y[2];} | |
491 | 504 | } |
492 | 505 | catch(m){} |
493 | 506 | } | ... | ... |
classesjs/compactados/classe_eventos_compacto.js
1 | -if(typeof(i3GEO)==='undefined'){i3GEO=[]}objposicaocursor={ddx:"",ddy:"",dmsx:"",dmsy:"",telax:"",telay:"",imgx:"",imgy:"",refx:"",refy:""};i3GEO.eventos={NAVEGAMAPA:["atualizaEscalaNumerica()"],MOUSEPARADO:["i3GEO.navega.mostraRosaDosVentos()"],MOUSEMOVE:[],MOUSEDOWN:[],MOUSEUP:[],MOUSECLIQUE:["i3GEO.eventos.cliqueCapturaPt()"],TIMERPARADO:"",mouseParado:function(){try{clearTimeout(i3GEO.eventos.TIMERPARADO)}catch(e){i3GEO.eventos.TIMERPARADO=""}if(objposicaocursor.dentroDomapa===false){return}try{if(objposicaocursor.imgy===""){objposicaocursor.imgy=1;objposicaocursor.imgx=1}if(i3GEO.eventos.MOUSEPARADO.length>0&&objposicaocursor.imgy>0&&objposicaocursor.imgx>0){if(objposicaocursor.imgx>0){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEPARADO)}}}catch(e){}},navegaMapa:function(){i3GEO.eventos.executaEventos(i3GEO.eventos.NAVEGAMAPA)},mousemoveMapa:function(){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEMOVE)},mousedownMapa:function(){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEDOWN)},mouseupMapa:function(){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEUP)},mousecliqueMapa:function(){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSECLIQUE)},executaEventos:function(eventos){try{var f,temp;if(eventos.length>0){f=eventos.length-1;if(f>=0){do{eval(eventos[f])}while(f--)}}}catch(e){}},posicaoMouseMapa:function(e){var teladd,teladms,container,targ,pos,mousex,mousey,xfig,yfig,xreffig,yreffig,xtela,ytela,c,ex,r;try{container=e.target.parentNode.id}catch(erro){}if(container!=="divGeometriasTemp"){if((i3GEO.Interface.ATUAL==="googlemaps")||(i3GEO.Interface.ATUAL==="openlayers")){return}}if(!e){e=window.event}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.id===""&&$i(i3GEO.Interface.IDMAPA)){targ=$i(i3GEO.Interface.IDMAPA)}try{if(g_panM!=='undefined'&&g_panM==="sim"){pos=i3GEO.util.pegaPosicaoObjeto(targ.parentNode)}else{pos=i3GEO.util.pegaPosicaoObjeto(targ)}if((i3GEO.configura.entorno==="sim")&&(g_panM==="sim")){pos[0]=pos[0]-i3GEO.parametros.w;pos[1]=pos[1]-i3GEO.parametros.h}}catch(m){pos=i3GEO.util.pegaPosicaoObjeto(targ)}mousex=0;mousey=0;if(e.pageX||e.pageY){mousex=e.pageX;mousey=e.pageY}else if(e.clientX||e.clientY){mousex=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;mousey=e.clientY+document.body.scrollTop+document.documentElement.scrollTop}xfig=mousex-pos[0];yfig=mousey-pos[1];xreffig=xfig;yreffig=yfig;xtela=mousex;ytela=mousey;c=i3GEO.parametros.pixelsize;ex=i3GEO.parametros.mapexten;try{if(targ.id==="imagemReferencia"){c=i3GEO.parametros.celularef;ex=i3GEO.parametros.extentref;r=$i("i3geo_rosa");if(r){r.style.display="none"}}}catch(e){i3GEO.parametros.celularef=0}teladd=i3GEO.calculo.tela2dd(xfig,yfig,c,ex);teladms=i3GEO.calculo.dd2dms(teladd[0],teladd[1]);objposicaocursor={ddx:teladd[0],ddy:teladd[1],dmsx:teladms[0],dmsy:teladms[1],telax:xtela,telay:ytela,imgx:xfig,imgy:yfig,refx:xreffig,refy:yreffig,dentroDomapa:true}},ativa:function(docMapa){docMapa.onmouseover=function(){objposicaocursor.dentroDomapa=true;this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy);try{try{clearTimeout(i3GEO.eventos.TIMERPARADO)}catch(e){}i3GEO.eventos.TIMERPARADO=setTimeout('i3GEO.eventos.mouseParado()',i3GEO.configura.tempoMouseParado)}catch(e){}try{i3GEO.eventos.mousemoveMapa()}catch(e){}}};docMapa.onmouseout=function(){objposicaocursor.dentroDomapa=true;try{objmapaparado="parar"}catch(e){}};docMapa.onmousedown=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mousedownMapa()}};docMapa.onclick=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mousecliqueMapa()}};docMapa.onmouseup=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mouseupMapa()}}},botaoDireita:function(exy){try{var k;if(navm){k=event.button}else{k=exy.button}if(k!==2){return false}else{return true}}catch(e){return false}},cliqueCapturaPt:function(){var x,y,doc;if(g_tipoacao!=="capturaponto"){return}else{if($i("wdocai")){doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument}try{x=objposicaocursor.dmsx.split(" ");y=objposicaocursor.dmsy.split(" ");if(doc.getElementById("ixg")){doc.getElementById("ixg").value=x[0]}if(doc.getElementById("ixm")){doc.getElementById("ixm").value=x[1]}if(doc.getElementById("ixs")){doc.getElementById("ixs").value=x[2]}if(doc.getElementById("iyg")){doc.getElementById("iyg").value=y[0]}if(doc.getElementById("iym")){doc.getElementById("iym").value=y[1]}if(doc.getElementById("iys")){doc.getElementById("iys").value=y[2]}}catch(m){}}}}; | |
2 | 1 | \ No newline at end of file |
2 | +if(typeof(i3GEO)==='undefined'){i3GEO=[]}objposicaocursor={ddx:"",ddy:"",dmsx:"",dmsy:"",telax:"",telay:"",imgx:"",imgy:"",refx:"",refy:""};i3GEO.eventos={NAVEGAMAPA:["atualizaEscalaNumerica()"],MOUSEPARADO:["i3GEO.navega.mostraRosaDosVentos()"],MOUSEMOVE:[],MOUSEDOWN:[],MOUSEUP:[],MOUSECLIQUE:["i3GEO.eventos.cliqueCapturaPt()"],TIMERPARADO:"",mouseParado:function(){try{clearTimeout(i3GEO.eventos.TIMERPARADO)}catch(e){i3GEO.eventos.TIMERPARADO=""}if(objposicaocursor.dentroDomapa===false){return}try{if(objposicaocursor.imgy===""){objposicaocursor.imgy=1;objposicaocursor.imgx=1}if(i3GEO.eventos.MOUSEPARADO.length>0&&objposicaocursor.imgy>0&&objposicaocursor.imgx>0){if(objposicaocursor.imgx>0){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEPARADO)}}}catch(e){}},navegaMapa:function(){i3GEO.eventos.executaEventos(i3GEO.eventos.NAVEGAMAPA)},mousemoveMapa:function(){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEMOVE)},mousedownMapa:function(){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEDOWN)},mouseupMapa:function(){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSEUP)},mousecliqueMapa:function(){i3GEO.eventos.executaEventos(i3GEO.eventos.MOUSECLIQUE)},executaEventos:function(eventos){try{var f,temp;if(eventos.length>0){f=eventos.length-1;if(f>=0){do{eval(eventos[f])}while(f--)}}}catch(e){}},posicaoMouseMapa:function(e){var teladd,teladms,container,targ,pos,mousex,mousey,xfig,yfig,xreffig,yreffig,xtela,ytela,c,ex,r;try{container=e.target.parentNode.id}catch(erro){}if(container!=="divGeometriasTemp"){if((i3GEO.Interface.ATUAL==="googlemaps")||(i3GEO.Interface.ATUAL==="openlayers")){return}}if(!e){e=window.event}if(e.target){targ=e.target}else if(e.srcElement){targ=e.srcElement}if(targ.id===""&&$i(i3GEO.Interface.IDMAPA)){targ=$i(i3GEO.Interface.IDMAPA)}try{if(g_panM!=='undefined'&&g_panM==="sim"){pos=i3GEO.util.pegaPosicaoObjeto(targ.parentNode)}else{pos=i3GEO.util.pegaPosicaoObjeto(targ)}if((i3GEO.configura.entorno==="sim")&&(g_panM==="sim")){pos[0]=pos[0]-i3GEO.parametros.w;pos[1]=pos[1]-i3GEO.parametros.h}}catch(m){pos=i3GEO.util.pegaPosicaoObjeto(targ)}mousex=0;mousey=0;if(e.pageX||e.pageY){mousex=e.pageX;mousey=e.pageY}else if(e.clientX||e.clientY){mousex=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft;mousey=e.clientY+document.body.scrollTop+document.documentElement.scrollTop}xfig=mousex-pos[0];yfig=mousey-pos[1];xreffig=xfig;yreffig=yfig;xtela=mousex;ytela=mousey;c=i3GEO.parametros.pixelsize;ex=i3GEO.parametros.mapexten;try{if(targ.id==="imagemReferencia"){c=i3GEO.parametros.celularef;ex=i3GEO.parametros.extentref;r=$i("i3geo_rosa");if(r){r.style.display="none"}}}catch(e){i3GEO.parametros.celularef=0}teladd=i3GEO.calculo.tela2dd(xfig,yfig,c,ex);teladms=i3GEO.calculo.dd2dms(teladd[0],teladd[1]);objposicaocursor={ddx:teladd[0],ddy:teladd[1],dmsx:teladms[0],dmsy:teladms[1],telax:xtela,telay:ytela,imgx:xfig,imgy:yfig,refx:xreffig,refy:yreffig,dentroDomapa:true}},ativa:function(docMapa){docMapa.onmouseover=function(){objposicaocursor.dentroDomapa=true;this.onmousemove=function(exy){i3GEO.eventos.posicaoMouseMapa(exy);try{try{clearTimeout(i3GEO.eventos.TIMERPARADO)}catch(e){}i3GEO.eventos.TIMERPARADO=setTimeout('i3GEO.eventos.mouseParado()',i3GEO.configura.tempoMouseParado)}catch(e){}try{i3GEO.eventos.mousemoveMapa()}catch(e){}}};docMapa.onmouseout=function(){objposicaocursor.dentroDomapa=true;try{objmapaparado="parar"}catch(e){}};docMapa.onmousedown=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mousedownMapa()}};docMapa.onclick=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mousecliqueMapa()}};docMapa.onmouseup=function(exy){if(!i3GEO.eventos.botaoDireita(exy)){i3GEO.eventos.mouseupMapa()}}},botaoDireita:function(exy){try{var k;if(navm){k=event.button}else{k=exy.button}if(k!==2){return false}else{return true}}catch(e){return false}},cliqueCapturaPt:function(ixg,ixm,ixs,iyg,iym,iys){if(arguments.length===0){var ixg="ixg",ixm="ixm",ixs="ixs",iyg="iyg",iym="iym",iys="iys",x,y;if($i("wdocai")){doc=(navm)?document.frames("wdocai").document:$i("wdocai").contentDocument}}else{var doc=document;x,y}if(g_tipoacao!=="capturaponto"){return}else{try{x=objposicaocursor.dmsx.split(" ");y=objposicaocursor.dmsy.split(" ");if(doc.getElementById(ixg)){doc.getElementById(ixg).value=x[0]}if(doc.getElementById(ixm)){doc.getElementById(ixm).value=x[1]}if(doc.getElementById(ixs)){doc.getElementById(ixs).value=x[2]}if(doc.getElementById(iyg)){doc.getElementById(iyg).value=y[0]}if(doc.getElementById(iym)){doc.getElementById(iym).value=y[1]}if(doc.getElementById(iys)){doc.getElementById(iys).value=y[2]}}catch(m){}}}}; | |
3 | 3 | \ No newline at end of file | ... | ... |