Skip to content

Commit

Permalink
#498 LayersTool - Prevent toggle of loading layer
Browse files Browse the repository at this point in the history
  • Loading branch information
tariqksoliman committed Mar 15, 2024
1 parent f55179b commit 95d995e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/essence/Tools/Layers/LayersTool.js
Original file line number Diff line number Diff line change
Expand Up @@ -600,6 +600,13 @@ function interfaceWithMMGIS(fromInit) {
}

async function toggleLayer(checkbox) {
if (checkbox.hasClass('loading')) {
console.warn(
'LayersTool - Cannot toggle layer that is still loading.'
)
return
}

let li = checkbox.parent().parent().parent()
if (li.attr('type') !== 'header') {
const layerName = li.attr('name')
Expand Down

0 comments on commit 95d995e

Please sign in to comment.