Skip to content

v1.4.0

Compare
Choose a tag to compare
@themustafaomar themustafaomar released this 20 Nov 08:35
· 50 commits to master since this release

v1.4.0

  • refactor: drop dom handler class
  • refactor: move tooltip functionality to class (#53)
  • fix: fix mouseup event & fix zoom buttons
  • refactor: clean up util API
  • refactor: refactor directory structure
  • fix: fix 'addMarkers' method doesn't work with arrays
  • fix(scroll): fix mouse wheel behavior (#52)

BREAKING CHANGES

Map container

The map container was an instance of a custom class in early versions, now it's just a DOM element.

const map = new jsVectorMap({
  onLoaded: (map) => {
    // ❌ Won't work anymore.
    map.container.delegate(".jvm-region", "click", (event) => {
      // ..
    })

    // ✅ You will need to define your own event listener, example
    map.container.addEventListener('click', (event) => {
      if (event.target.matches('.jvm-region')) {
        // Do something
      }
    })
  }
})