chore: replace Math.pow with **

This commit is contained in:
bcakmakoglu
2022-06-03 20:53:05 +02:00
committed by Braks
parent 0b21708b58
commit 2bd15c1710

View File

@@ -122,7 +122,7 @@ onMounted(() => {
const point = pointer(event)
// taken from https://github.com/d3/d3-zoom/blob/master/src/zoom.js
const pinchDelta = -event.deltaY * (event.deltaMode === 1 ? 0.05 : event.deltaMode ? 1 : 0.002) * 10
const zoom = currentZoom * Math.pow(2, pinchDelta)
const zoom = currentZoom * 2 ** pinchDelta
if (d3Selection) d3Zoom.scaleTo(d3Selection, zoom, point)
return