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}
|
width={stageDimensions.width}
|
||||||
height={stageDimensions.height}
|
height={stageDimensions.height}
|
||||||
scale={{ x: stageScale, y: stageScale }}
|
scale={{ x: stageScale, y: stageScale }}
|
||||||
|
onTouchStart={handleMouseDown}
|
||||||
|
onTouchMove={handleMouseMove}
|
||||||
|
onTouchEnd={handleMouseUp}
|
||||||
onMouseDown={handleMouseDown}
|
onMouseDown={handleMouseDown}
|
||||||
onMouseEnter={handleMouseEnter}
|
onMouseEnter={handleMouseEnter}
|
||||||
onMouseLeave={handleMouseOut}
|
onMouseLeave={handleMouseOut}
|
||||||
|
@ -31,7 +31,7 @@ const useCanvasMouseDown = (stageRef: MutableRefObject<Konva.Stage | null>) => {
|
|||||||
const { tool, isStaging } = useAppSelector(selector);
|
const { tool, isStaging } = useAppSelector(selector);
|
||||||
|
|
||||||
return useCallback(
|
return useCallback(
|
||||||
(e: KonvaEventObject<MouseEvent>) => {
|
(e: KonvaEventObject<MouseEvent | TouchEvent>) => {
|
||||||
if (!stageRef.current) return;
|
if (!stageRef.current) return;
|
||||||
|
|
||||||
stageRef.current.container().focus();
|
stageRef.current.container().focus();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user