Skip to content

Commit 05a76ba

Browse files
committed
Fixed multiple add event listeners on websage.js.
1 parent 7fac813 commit 05a76ba

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/htdocs/websage.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -740,12 +740,6 @@ else
740740
return; // give up
741741
}
742742

743-
// on closing info window, cancel point and hide object highlight
744-
WebSAGE.g_win_cmd.addEventListener("unload", function() {
745-
WebSAGE.escondeDestaqPonto(NPTO);
746-
NPTO = 0;
747-
})
748-
749743
// janela carregada
750744
var se = ESTACAO;
751745
se = se + "-";
@@ -830,6 +824,13 @@ else
830824
);
831825

832826
if (WebSAGE.g_win_1stdraw) {
827+
828+
// on closing info window, cancel point and hide object highlight
829+
WebSAGE.g_win_cmd.addEventListener("unload", function() {
830+
WebSAGE.escondeDestaqPonto(NPTO);
831+
NPTO = 0;
832+
})
833+
833834
// escreve parâmetros só na primeira vez que abriu a janela
834835
clearTimeout(WebSAGE.g_tminfoID);
835836
WebSAGE.g_win_1stdraw = 0;

0 commit comments

Comments
 (0)