mirror of
https://github.com/jlfwong/speedscope.git
synced 2024-11-23 06:22:41 +03:00
Grab cursor for drag-panning
This commit is contained in:
parent
09a2b60512
commit
e59299cfc5
@ -432,6 +432,8 @@ export class FlamechartPanZoomView extends ReloadableComponent<FlamechartPanZoom
|
|||||||
private lastDragPos: Vec2 | null = null
|
private lastDragPos: Vec2 | null = null
|
||||||
|
|
||||||
private onMouseDown = (ev: MouseEvent) => {
|
private onMouseDown = (ev: MouseEvent) => {
|
||||||
|
document.body.style.cursor = 'grabbing'
|
||||||
|
document.body.style.cursor = '-webkit-grabbing'
|
||||||
this.lastDragPos = new Vec2(ev.offsetX, ev.offsetY)
|
this.lastDragPos = new Vec2(ev.offsetX, ev.offsetY)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -507,6 +509,7 @@ export class FlamechartPanZoomView extends ReloadableComponent<FlamechartPanZoom
|
|||||||
}
|
}
|
||||||
|
|
||||||
private onWindowMouseUp = (ev: MouseEvent) => {
|
private onWindowMouseUp = (ev: MouseEvent) => {
|
||||||
|
document.body.style.cursor = 'default'
|
||||||
this.lastDragPos = null
|
this.lastDragPos = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user