UNPKG

lisn.js

Version:

Simply handle user gestures and actions. Includes widgets.

1 lines 16.8 kB
{"version":3,"file":"gesture-touch.cjs","names":["MC","_interopRequireWildcard","require","MH","_directions","_math","_xMap","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","getTouchGestureFragment","events","options","_options$dragHoldTime","_options$dragNumFinge","isIterableObject","moves","getTouchDiff","deltaThreshold","numMoves","lengthOf","holdTime","getHoldTime","canBeDrag","dragHoldTime","dragNumFingers","angleDiffThreshold","deltaX","havingMaxAbs","map","m","deltaY","deltaZ","filter","d","isSignificant","direction","S_NONE","intent","S_UNKNOWN","vectorA","vectorB","areAntiParallel","startDistance","distanceBetween","startX","startY","endDistance","endX","endY","S_IN","S_OUT","S_ZOOM","deltaSign","reverseScroll","isFirst","S_DRAG","S_SCROLL","thisDirection","getVectorDirection","S_AMBIGUOUS","lastTouchEvent","lastOf","isTouchEvent","touches","device","S_TOUCH","exports","groupedTouches","newXMap","event","type","S_TOUCHCANCEL","touch","sGet","identifier","push","touchList","values","nTouches","firstTouch","lastTouch","clientX","clientY","maxAbs","firstStart","findIndex","S_TOUCHSTART","firstMove","S_TOUCHMOVE","timeStamp"],"sources":["../../../src/ts/utils/gesture-touch.ts"],"sourcesContent":["/**\n * @module Utils\n */\n\nimport * as MC from \"@lisn/globals/minification-constants\";\nimport * as MH from \"@lisn/globals/minification-helpers\";\n\nimport { Direction, GestureIntent, Vector } from \"@lisn/globals/types\";\n\nimport { getVectorDirection } from \"@lisn/utils/directions\";\n\nimport {\n maxAbs,\n havingMaxAbs,\n distanceBetween,\n areAntiParallel,\n} from \"@lisn/utils/math\";\nimport { GestureFragment } from \"@lisn/utils/gesture\";\n\nimport { newXMap } from \"@lisn/modules/x-map\";\n\n/**\n * @category Gestures\n */\nexport type TouchDiff = {\n startX: number;\n startY: number;\n\n endX: number;\n endY: number;\n\n deltaX: number;\n deltaY: number;\n\n isSignificant: boolean;\n};\n\n/**\n * Returns a {@link GestureFragment} for the given events. Only \"touchmove\" events\n * will be considered.\n *\n * If there are less than 2 such events in the given list of events, returns `false`.\n *\n * If the gesture is to be considered terminated, e.g. because there is\n * \"touchcancel\" in the list, returns `null`.\n *\n * Note that by default swipe actions follow the natural direction: swipe up\n * with scroll intent results in direction down and swipe down results in\n * direction up. Drag intent always follows the direction of the gesture.\n *\n * For zoom intents, which necessarily involves exactly two fingers `deltaZ`\n * is based on the relative change in distance between the fingers.\n *\n * @param [options.deltaThreshold]\n * A change of x or y coordinate less than this is\n * considered insignificant, for the purposes of\n * determining:\n * 1) whether the inferred direction is in one of the\n * four cardinal ones, or otherwise ambiguous; and\n * 2) whether more than two fingers have moved and\n * therefore whether the direction could be zoom or\n * not\n * @param [options.angleDiffThreshold] See {@link getVectorDirection}\n * @param [options.reverseScroll]\n * If set to `true`, will disable natural scroll\n * direction.\n * @param [options.dragHoldTime]\n * If the user presses and holds for at least the\n * given amount of milliseconds before moving the\n * finger(s), gestures other than pinch will be\n * treated as a drag instead of scroll as long as the\n * number of fingers touching the screen is\n * `options.dragNumFingers`. Default is 500ms.\n * @param [options.dragNumFingers]\n * The number of fingers that could be considered a\n * drag intent. Default is 1.\n *\n * @returns `false` if there are less than 2 \"touchmove\" events in the list,\n * `null` if the gesture is terminated, otherwise a {@link GestureFragment}.\n *\n * @category Gestures\n */\nexport const getTouchGestureFragment = (\n events: Event[],\n options?: {\n deltaThreshold?: number;\n angleDiffThreshold?: number;\n reverseScroll?: boolean;\n dragHoldTime?: number;\n dragNumFingers?: number;\n },\n): GestureFragment | null | false => {\n if (!MH.isIterableObject(events)) {\n events = [events];\n }\n\n let moves = getTouchDiff(events, options?.deltaThreshold);\n\n if (!moves) {\n return null; // terminated\n }\n\n let numMoves = MH.lengthOf(moves);\n\n const holdTime = getHoldTime(events);\n const canBeDrag =\n holdTime >= (options?.dragHoldTime ?? 500) &&\n numMoves === (options?.dragNumFingers ?? 1);\n const angleDiffThreshold = options?.angleDiffThreshold;\n\n let deltaX = havingMaxAbs(...moves.map((m) => m.deltaX));\n let deltaY = havingMaxAbs(...moves.map((m) => m.deltaY));\n let deltaZ = 1;\n\n if (numMoves > 2) {\n // Take only the significant ones\n moves = MH.filter(moves, (d) => d.isSignificant);\n numMoves = MH.lengthOf(moves);\n }\n\n let direction: Direction = MC.S_NONE;\n let intent: GestureIntent = MC.S_UNKNOWN;\n if (numMoves === 2) {\n // Check if it's a zoom\n const vectorA: Vector = [moves[0].deltaX, moves[0].deltaY];\n const vectorB: Vector = [moves[1].deltaX, moves[1].deltaY];\n\n // If either finger is approx stationary, or if they move in opposite directions,\n // treat it as zoom.\n if (\n !havingMaxAbs(...vectorA) || // finger A still\n !havingMaxAbs(...vectorB) || // finger B still\n areAntiParallel(vectorA, vectorB, angleDiffThreshold)\n ) {\n // It's a pinch motion => zoom\n const startDistance = distanceBetween(\n [moves[0].startX, moves[0].startY],\n [moves[1].startX, moves[1].startY],\n );\n\n const endDistance = distanceBetween(\n [moves[0].endX, moves[0].endY],\n [moves[1].endX, moves[1].endY],\n );\n\n direction = startDistance < endDistance ? MC.S_IN : MC.S_OUT;\n deltaZ = endDistance / startDistance;\n deltaX = deltaY = 0;\n intent = MC.S_ZOOM;\n }\n }\n\n const deltaSign = canBeDrag || options?.reverseScroll ? 1 : -1;\n // If scrolling, swap the deltas for natural scroll direction.\n // Add +0 to force -0 to be +0 since jest doesn't think they're equal\n deltaX = deltaSign * deltaX + 0;\n deltaY = deltaSign * deltaY + 0;\n\n if (direction === MC.S_NONE) {\n // Wasn't a zoom. Check if all moves are aligned.\n let isFirst = true;\n\n for (const m of moves) {\n // There's at least one significant move, assume scroll or drag intent.\n intent = canBeDrag ? MC.S_DRAG : MC.S_SCROLL;\n\n const thisDirection = getVectorDirection(\n [deltaSign * m.deltaX, deltaSign * m.deltaY],\n angleDiffThreshold,\n );\n\n if (thisDirection === MC.S_NONE) {\n continue;\n }\n\n if (isFirst) {\n direction = thisDirection;\n } else if (direction !== thisDirection) {\n direction = MC.S_AMBIGUOUS;\n break;\n }\n\n isFirst = false;\n }\n }\n\n if (direction === MC.S_NONE) {\n const lastTouchEvent = MH.lastOf(events.filter(MH.isTouchEvent));\n // If all fingers have lifted off, consider it terminated, otherwise wait\n // for more events.\n return MH.lengthOf(lastTouchEvent?.touches) ? false : null;\n }\n\n return {\n device: MC.S_TOUCH,\n direction,\n intent,\n deltaX,\n deltaY,\n deltaZ,\n };\n};\n\n/**\n * Returns a description of the changes in each finger between the first and\n * the last relevant TouchEvent in the list.\n *\n * If the gesture is to be considered terminated, e.g. because there is\n * \"touchcancel\" in the list, returns `null`.\n *\n * Note that, `deltaX`/`deltaY` are the end X/Y coordinate minus the start X/Y\n * coordinate. For natural scroll direction you should swap their signs.\n *\n * @param deltaThreshold If the change of x and y coordinate are both less\n * than this, it is marked as not significant.\n *\n * @category Gestures\n */\nexport const getTouchDiff = (\n events: Event[],\n deltaThreshold = 0,\n): TouchDiff[] | null => {\n // Group each touch point of each event by identifier, so that we can get the\n // start and end coordinate of each finger\n const groupedTouches = newXMap<number, Touch[]>((): Touch[] => []);\n\n for (const event of events) {\n if (!MH.isTouchEvent(event)) {\n continue;\n }\n\n if (event.type === MC.S_TOUCHCANCEL) {\n return null; // gesture terminated\n }\n\n for (const touch of event.touches) {\n groupedTouches.sGet(touch.identifier).push(touch);\n }\n }\n\n const moves: TouchDiff[] = [];\n\n for (const touchList of groupedTouches.values()) {\n const nTouches = MH.lengthOf(touchList);\n if (nTouches < 2) {\n // Only one event had that finger in it, so there's no move for it\n continue;\n }\n\n const firstTouch = touchList[0];\n const lastTouch = touchList[nTouches - 1];\n const startX = firstTouch.clientX;\n const startY = firstTouch.clientY;\n\n const endX = lastTouch.clientX;\n const endY = lastTouch.clientY;\n\n const deltaX = endX - startX;\n const deltaY = endY - startY;\n\n const isSignificant = maxAbs(deltaX, deltaY) >= deltaThreshold;\n\n // Consider it a move in one of the 4 cardinal ones\n moves.push({\n startX,\n startY,\n endX,\n endY,\n deltaX,\n deltaY,\n isSignificant,\n });\n }\n\n return moves;\n};\n\n// --------------------\n\nconst getHoldTime = (events: Event[]) => {\n const firstStart = events.findIndex((e) => e.type === MC.S_TOUCHSTART);\n const firstMove = events.findIndex((e) => e.type === MC.S_TOUCHMOVE);\n if (firstStart < 0 || firstMove < 1) {\n return 0;\n }\n\n return events[firstMove].timeStamp - events[firstStart].timeStamp;\n};\n"],"mappings":";;;;;;AAIA,IAAAA,EAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,EAAA,GAAAF,uBAAA,CAAAC,OAAA;AAIA,IAAAE,WAAA,GAAAF,OAAA;AAEA,IAAAG,KAAA,GAAAH,OAAA;AAQA,IAAAI,KAAA,GAAAJ,OAAA;AAA8C,SAAAD,wBAAAM,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAR,uBAAA,YAAAA,CAAAM,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CA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