Commit 94533ada23434c6bc3e29a4d1379ee7d9c969674
1 parent
fcba7736
Exists in
master
and in
7 other branches
Validação com jslint
Showing
1 changed file
with
15 additions
and
16 deletions
Show diff stats
classesjs/classe_i3geo.js
... | ... | @@ -183,7 +183,6 @@ i3GEO = { |
183 | 183 | cria:function(){ |
184 | 184 | if (window.location.href.split("?")[1]){ |
185 | 185 | i3GEO.configura.sid = window.location.href.split("?")[1]; |
186 | - g_sid = i3GEO.configura.sid; | |
187 | 186 | // |
188 | 187 | //a biblioteca YUI, por algum motivo, acrescenta # na URL. O # precisa ser removido, caso contrário, a opção de reload da página pelo browser as vezes não funciona |
189 | 188 | // |
... | ... | @@ -192,8 +191,11 @@ i3GEO = { |
192 | 191 | } |
193 | 192 | else |
194 | 193 | {i3GEO.configura.sid = "";} |
194 | + // | |
195 | 195 | //para efeitos de compatibilidade |
196 | + // | |
196 | 197 | g_panM = "nao"; |
198 | + g_sid = i3GEO.configura.sid; | |
197 | 199 | try {i3GEO.configura.locaplic = g_locaplic;} |
198 | 200 | catch(e){g_locaplic = i3GEO.configura.locaplic;} |
199 | 201 | try{i3GEO.configura.diminuixM = g_diminuixM;}catch(e){} |
... | ... | @@ -208,11 +210,9 @@ i3GEO = { |
208 | 210 | // |
209 | 211 | //subtrai barra de rolagem |
210 | 212 | // |
211 | - try{ | |
212 | - var a = i3GEO.util.getScrollerWidth(); | |
213 | - diminuiy += a; | |
214 | - } | |
215 | - catch(r){} | |
213 | + try{diminuiy += i3GEO.util.getScrollerWidth();} | |
214 | + catch(e){} | |
215 | + // | |
216 | 216 | var menos = 0; |
217 | 217 | if ($i("contemFerramentas")) |
218 | 218 | {menos += parseInt($i("contemFerramentas").style.width,10);} |
... | ... | @@ -247,9 +247,10 @@ i3GEO = { |
247 | 247 | {var h = parseInt(temp.style.height,10);} |
248 | 248 | } |
249 | 249 | } |
250 | - if($i("contemImg")){ | |
251 | - $i("contemImg").style.height=h + "px"; | |
252 | - $i("contemImg").style.width=w + "px"; | |
250 | + var temp = $i("contemImg"); | |
251 | + if(temp){ | |
252 | + temp.style.height=h + "px"; | |
253 | + temp.style.width=w + "px"; | |
253 | 254 | } |
254 | 255 | i3GEO.Interface.cria(w,h); |
255 | 256 | i3GEO.parametros = { |
... | ... | @@ -323,7 +324,7 @@ i3GEO = { |
323 | 324 | if (titulo !== "") |
324 | 325 | {top.document.title = titulo;} |
325 | 326 | } |
326 | - catch(e){var e = "";} | |
327 | + catch(e){} | |
327 | 328 | i3GEO.ajuda.mostraJanela("Tempo de desenho em segundos: "+tempo,""); |
328 | 329 | i3GEO.parametros.mapexten= mapexten; |
329 | 330 | i3GEO.parametros.mapscale= parseInt(mapscale,10); |
... | ... | @@ -389,10 +390,7 @@ i3GEO = { |
389 | 390 | var abreJM = "sim"; |
390 | 391 | if (i3GEO.util.pegaCookie("g_janelaMen")){ |
391 | 392 | var abreJM = i3GEO.util.pegaCookie("g_janelaMen"); |
392 | - if(abreJM == "sim") | |
393 | - {i3GEO.configura.iniciaJanelaMensagens = true;} | |
394 | - else | |
395 | - {i3GEO.configura.iniciaJanelaMensagens = false;} | |
393 | + i3GEO.configura.iniciaJanelaMensagens = (abreJM == "sim") ? true : false; | |
396 | 394 | } |
397 | 395 | if(i3GEO.configura.iniciaJanelaMensagens === true) |
398 | 396 | {i3GEO.ajuda.abreJanela();} |
... | ... | @@ -407,7 +405,7 @@ i3GEO = { |
407 | 405 | if($i("mst")) |
408 | 406 | {$i("mst").style.visibility ="hidden";} |
409 | 407 | // |
410 | - //se g_sid="", o html foi aberto diretamente | |
408 | + //se i3GEO.configura.sid = "", o html foi aberto diretamente | |
411 | 409 | //então, é necessário criar os arquivos temporários do mapa |
412 | 410 | //essa operação deve ser assíncrona |
413 | 411 | // |
... | ... | @@ -520,7 +518,8 @@ i3GEO = { |
520 | 518 | catch(e){} |
521 | 519 | i3GEO.Interface.redesenha(); |
522 | 520 | //caso esteja na função de identificação |
523 | - if($i("i3GEOidentificalistaTemas")){g_tipoacao = "identifica";g_operacao='identifica';} | |
521 | + if($i("i3GEOidentificalistaTemas")) | |
522 | + {g_tipoacao = "identifica";g_operacao='identifica';} | |
524 | 523 | else |
525 | 524 | {g_operacao = "";} |
526 | 525 | i3GEO.parametros.mapexten = mapexten; | ... | ... |