Skip to content

Commit 5b598fb

Browse files
#498 LayersTool - Prevent toggle of loading layer (#513)
1 parent f55179b commit 5b598fb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/essence/Tools/Layers/LayersTool.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,13 @@ function interfaceWithMMGIS(fromInit) {
600600
}
601601

602602
async function toggleLayer(checkbox) {
603+
if (checkbox.hasClass('loading')) {
604+
console.warn(
605+
'LayersTool - Cannot toggle layer that is still loading.'
606+
)
607+
return
608+
}
609+
603610
let li = checkbox.parent().parent().parent()
604611
if (li.attr('type') !== 'header') {
605612
const layerName = li.attr('name')

0 commit comments

Comments
 (0)