Skip to content

Commit

Permalink
chore: refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
turban committed Dec 4, 2023
1 parent 5d8ebdf commit 9f14e06
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -486,19 +486,23 @@ export class MapGL extends Evented {

// Add class to map container
_addClass(className) {
const { classList } = this.getContainer()
if (this._mapgl) {
const { classList } = this._mapgl._container

if (!classList.contains(className)) {
classList.add(className)
if (!classList.contains(className)) {
classList.add(className)
}
}
}

// Remove class from map container
_removeClass(className) {
const { classList } = this.getContainer()
if (this._mapgl) {
const { classList } = this._mapgl._container

if (classList.contains(className)) {
classList.remove(className)
if (classList.contains(className)) {
classList.remove(className)
}
}
}
}
Expand Down

0 comments on commit 9f14e06

Please sign in to comment.