gridviz 3.0.25 → 3.0.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gridviz.js +7 -2
- package/dist/gridviz.min.js +1 -1
- package/package.json +2 -2
- package/src/core/GeoCanvas.js +6 -1
package/package.json
CHANGED
package/src/core/GeoCanvas.js
CHANGED
|
@@ -30,6 +30,7 @@ export class GeoCanvas {
|
|
|
30
30
|
|
|
31
31
|
/** @type {HTMLCanvasElement} */
|
|
32
32
|
this.canvas = canvas
|
|
33
|
+
this.canvas.style.cursor = 'grab' // default shown when hover
|
|
33
34
|
|
|
34
35
|
/** @type {number} */
|
|
35
36
|
this.w = this.canvas.offsetWidth
|
|
@@ -102,6 +103,8 @@ export class GeoCanvas {
|
|
|
102
103
|
})
|
|
103
104
|
.on('start', (e) => {
|
|
104
105
|
// start of zoom event
|
|
106
|
+
// show grabbing during pan/zoom
|
|
107
|
+
try { this.canvas.style.cursor = 'grabbing' } catch (err) { }
|
|
105
108
|
this._isZooming = true;
|
|
106
109
|
// save the current canvas state to keep onscreen during pan/zoom before redrawing
|
|
107
110
|
this.canvasSave.c = document.createElement('canvas')
|
|
@@ -115,11 +118,13 @@ export class GeoCanvas {
|
|
|
115
118
|
})
|
|
116
119
|
.on('end', (e) => {
|
|
117
120
|
// end of pan/zoom event
|
|
121
|
+
// restore cursor
|
|
122
|
+
try { this.canvas.style.cursor = 'grab' } catch (err) { }
|
|
118
123
|
this._isZooming = false;
|
|
119
124
|
this.redraw()
|
|
120
125
|
this.canvasSave = { c: null, dx: 0, dy: 0, f: 1 }
|
|
121
126
|
if (this.onZoomEndFun) this.onZoomEndFun(e)
|
|
122
|
-
|
|
127
|
+
|
|
123
128
|
})
|
|
124
129
|
// @ts-ignore
|
|
125
130
|
z(select(this.canvas))
|