mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-22 22:30:52 +01:00
prevent scrolling canvas on mobile (#156)
This commit is contained in:
parent
1d151a4f06
commit
29abb568ae
@ -33,6 +33,8 @@ export class FloorplanEditor
|
||||
canvas.height = height;
|
||||
canvas.width = width;
|
||||
|
||||
canvas.style.touchAction = 'none';
|
||||
|
||||
this._renderer = canvas.getContext('2d');
|
||||
|
||||
this._image = new Image();
|
||||
|
@ -138,8 +138,7 @@ export const FloorplanCanvasView: FC<ColumnProps> = props =>
|
||||
const currentElement = elementRef.current;
|
||||
|
||||
if(!currentElement) return;
|
||||
|
||||
|
||||
|
||||
currentElement.appendChild(FloorplanEditor.instance.renderer.canvas);
|
||||
|
||||
currentElement.addEventListener('pointerup', onPointerEvent);
|
||||
|
Loading…
Reference in New Issue
Block a user