mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Integrates #1487 - touch events
Need to add: - Pinch zoom - Touch-specific handling (some things aren't quite right)
This commit is contained in:
parent
87439feeb2
commit
d82a21cfb2
@ -149,6 +149,9 @@ const IAICanvas = () => {
|
||||
width={stageDimensions.width}
|
||||
height={stageDimensions.height}
|
||||
scale={{ x: stageScale, y: stageScale }}
|
||||
onTouchStart={handleMouseDown}
|
||||
onTouchMove={handleMouseMove}
|
||||
onTouchEnd={handleMouseUp}
|
||||
onMouseDown={handleMouseDown}
|
||||
onMouseEnter={handleMouseEnter}
|
||||
onMouseLeave={handleMouseOut}
|
||||
|
@ -31,7 +31,7 @@ const useCanvasMouseDown = (stageRef: MutableRefObject<Konva.Stage | null>) => {
|
||||
const { tool, isStaging } = useAppSelector(selector);
|
||||
|
||||
return useCallback(
|
||||
(e: KonvaEventObject<MouseEvent>) => {
|
||||
(e: KonvaEventObject<MouseEvent | TouchEvent>) => {
|
||||
if (!stageRef.current) return;
|
||||
|
||||
stageRef.current.container().focus();
|
||||
|
Loading…
Reference in New Issue
Block a user