Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
igoroctaviano committed Jul 12, 2024
1 parent b78f767 commit 0b249d4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions src/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,17 +140,13 @@ function disposeOverviewMapLayers (map) {
/**
* Dispose layer and its dependencies to free up memory.
*/
function disposeLayer (layer, disposeSource = false) {
export function disposeLayer (layer, disposeSource = false) {
console.info('dispose layer:', layer)
const source = layer.getSource()
if (disposeSource === true && source && source.clear) {
source.clear()
source.dispose()
}
const renderer = layer.getRenderer()
if (renderer) {
renderer.dispose()
}
layer.setSource(undefined)
layer.dispose()
}
Expand Down
2 changes: 1 addition & 1 deletion src/viewer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ const testCases = [
]
}),
style: {
color: [0, 126, 163],
color: [255, 234, 0],
opacity: 1
}
}
Expand Down

0 comments on commit 0b249d4

Please sign in to comment.