mirror of
https://github.com/billsonnn/nitro-react.git
synced 2025-01-18 21:36:27 +01:00
prevent scrolling canvas on mobile
This commit is contained in:
parent
baf8b62e43
commit
3e028ef401
@ -33,6 +33,8 @@ export class FloorplanEditor
|
|||||||
canvas.height = height;
|
canvas.height = height;
|
||||||
canvas.width = width;
|
canvas.width = width;
|
||||||
|
|
||||||
|
canvas.style.touchAction = 'none';
|
||||||
|
|
||||||
this._renderer = canvas.getContext('2d');
|
this._renderer = canvas.getContext('2d');
|
||||||
|
|
||||||
this._image = new Image();
|
this._image = new Image();
|
||||||
|
@ -139,7 +139,6 @@ export const FloorplanCanvasView: FC<ColumnProps> = props =>
|
|||||||
|
|
||||||
if(!currentElement) return;
|
if(!currentElement) return;
|
||||||
|
|
||||||
|
|
||||||
currentElement.appendChild(FloorplanEditor.instance.renderer.canvas);
|
currentElement.appendChild(FloorplanEditor.instance.renderer.canvas);
|
||||||
|
|
||||||
currentElement.addEventListener('pointerup', onPointerEvent);
|
currentElement.addEventListener('pointerup', onPointerEvent);
|
||||||
|
Loading…
Reference in New Issue
Block a user