Edit File by line
/home/barbar84/www/wp-inclu.../js/dist
File: components.js
[16500] Fix | Delete
addBindings(bindings, handler, this.onClick);
[16501] Fix | Delete
}
[16502] Fix | Delete
};
[16503] Fix | Delete
[16504] Fix | Delete
return DragRecognizer;
[16505] Fix | Delete
}(CoordinatesRecognizer);
[16506] Fix | Delete
[16507] Fix | Delete
/**
[16508] Fix | Delete
* Inlined from https://github.com/alexreardon/memoize-one
[16509] Fix | Delete
*/
[16510] Fix | Delete
function memoizeOne(resultFn, isEqual) {
[16511] Fix | Delete
var lastThis;
[16512] Fix | Delete
var lastArgs = [];
[16513] Fix | Delete
var lastResult;
[16514] Fix | Delete
var calledOnce = false;
[16515] Fix | Delete
[16516] Fix | Delete
function memoized() {
[16517] Fix | Delete
for (var _len = arguments.length, newArgs = new Array(_len), _key = 0; _key < _len; _key++) {
[16518] Fix | Delete
newArgs[_key] = arguments[_key];
[16519] Fix | Delete
}
[16520] Fix | Delete
[16521] Fix | Delete
if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {
[16522] Fix | Delete
return lastResult;
[16523] Fix | Delete
}
[16524] Fix | Delete
[16525] Fix | Delete
lastResult = resultFn.apply(this, newArgs);
[16526] Fix | Delete
calledOnce = true;
[16527] Fix | Delete
lastThis = this;
[16528] Fix | Delete
lastArgs = newArgs;
[16529] Fix | Delete
return lastResult;
[16530] Fix | Delete
}
[16531] Fix | Delete
[16532] Fix | Delete
return memoized;
[16533] Fix | Delete
}
[16534] Fix | Delete
[16535] Fix | Delete
/**
[16536] Fix | Delete
* Taken from https://github.com/FormidableLabs/react-fast-compare
[16537] Fix | Delete
*
[16538] Fix | Delete
* Dropped comments and ArrayBuffer handling
[16539] Fix | Delete
*/
[16540] Fix | Delete
function equal(a, b) {
[16541] Fix | Delete
if (a === b) return true;
[16542] Fix | Delete
[16543] Fix | Delete
if (a && b && typeof a == 'object' && typeof b == 'object') {
[16544] Fix | Delete
if (a.constructor !== b.constructor) return false;
[16545] Fix | Delete
var length, i, keys;
[16546] Fix | Delete
[16547] Fix | Delete
if (Array.isArray(a)) {
[16548] Fix | Delete
length = a.length;
[16549] Fix | Delete
if (length !== b.length) return false;
[16550] Fix | Delete
[16551] Fix | Delete
for (i = length; i-- !== 0;) {
[16552] Fix | Delete
if (!equal(a[i], b[i])) return false;
[16553] Fix | Delete
}
[16554] Fix | Delete
[16555] Fix | Delete
return true;
[16556] Fix | Delete
}
[16557] Fix | Delete
[16558] Fix | Delete
var it;
[16559] Fix | Delete
[16560] Fix | Delete
if (typeof Map === 'function' && a instanceof Map && b instanceof Map) {
[16561] Fix | Delete
if (a.size !== b.size) return false;
[16562] Fix | Delete
it = a.entries();
[16563] Fix | Delete
[16564] Fix | Delete
while (!(i = it.next()).done) {
[16565] Fix | Delete
if (!b.has(i.value[0])) return false;
[16566] Fix | Delete
}
[16567] Fix | Delete
[16568] Fix | Delete
it = a.entries();
[16569] Fix | Delete
[16570] Fix | Delete
while (!(i = it.next()).done) {
[16571] Fix | Delete
if (!equal(i.value[1], b.get(i.value[0]))) return false;
[16572] Fix | Delete
}
[16573] Fix | Delete
[16574] Fix | Delete
return true;
[16575] Fix | Delete
}
[16576] Fix | Delete
[16577] Fix | Delete
if (typeof Set === 'function' && a instanceof Set && b instanceof Set) {
[16578] Fix | Delete
if (a.size !== b.size) return false;
[16579] Fix | Delete
it = a.entries();
[16580] Fix | Delete
[16581] Fix | Delete
while (!(i = it.next()).done) {
[16582] Fix | Delete
if (!b.has(i.value[0])) return false;
[16583] Fix | Delete
}
[16584] Fix | Delete
[16585] Fix | Delete
return true;
[16586] Fix | Delete
}
[16587] Fix | Delete
[16588] Fix | Delete
if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;
[16589] Fix | Delete
if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();
[16590] Fix | Delete
if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();
[16591] Fix | Delete
keys = Object.keys(a);
[16592] Fix | Delete
length = keys.length;
[16593] Fix | Delete
if (length !== Object.keys(b).length) return false;
[16594] Fix | Delete
[16595] Fix | Delete
for (i = length; i-- !== 0;) {
[16596] Fix | Delete
if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;
[16597] Fix | Delete
}
[16598] Fix | Delete
[16599] Fix | Delete
if (typeof Element !== 'undefined' && a instanceof Element) return false;
[16600] Fix | Delete
[16601] Fix | Delete
for (i = length; i-- !== 0;) {
[16602] Fix | Delete
if (keys[i] === '_owner' && a.$$typeof) continue;
[16603] Fix | Delete
if (!equal(a[keys[i]], b[keys[i]])) return false;
[16604] Fix | Delete
}
[16605] Fix | Delete
[16606] Fix | Delete
return true;
[16607] Fix | Delete
} // true if both NaN, false otherwise — NaN !== NaN → true
[16608] Fix | Delete
// eslint-disable-next-line no-self-compare
[16609] Fix | Delete
[16610] Fix | Delete
[16611] Fix | Delete
return a !== a && b !== b;
[16612] Fix | Delete
}
[16613] Fix | Delete
[16614] Fix | Delete
function isEqual(a, b) {
[16615] Fix | Delete
try {
[16616] Fix | Delete
return equal(a, b);
[16617] Fix | Delete
} catch (error) {
[16618] Fix | Delete
if ((error.message || '').match(/stack|recursion/i)) {
[16619] Fix | Delete
// eslint-disable-next-line no-console
[16620] Fix | Delete
console.warn('react-fast-compare cannot handle circular refs');
[16621] Fix | Delete
return false;
[16622] Fix | Delete
}
[16623] Fix | Delete
[16624] Fix | Delete
throw error;
[16625] Fix | Delete
}
[16626] Fix | Delete
}
[16627] Fix | Delete
[16628] Fix | Delete
/**
[16629] Fix | Delete
* Drag hook.
[16630] Fix | Delete
*
[16631] Fix | Delete
* @param handler - the function fired every time the drag gesture updates
[16632] Fix | Delete
* @param [config={}] - the config object including generic options and drag options
[16633] Fix | Delete
*/
[16634] Fix | Delete
[16635] Fix | Delete
function useDrag(handler, config) {
[16636] Fix | Delete
if (config === void 0) {
[16637] Fix | Delete
config = {};
[16638] Fix | Delete
}
[16639] Fix | Delete
[16640] Fix | Delete
RecognizersMap.set('drag', DragRecognizer);
[16641] Fix | Delete
var buildDragConfig = Object(external_React_["useRef"])();
[16642] Fix | Delete
[16643] Fix | Delete
if (!buildDragConfig.current) {
[16644] Fix | Delete
buildDragConfig.current = memoizeOne(_buildDragConfig, isEqual);
[16645] Fix | Delete
}
[16646] Fix | Delete
[16647] Fix | Delete
return useRecognizers({
[16648] Fix | Delete
drag: handler
[16649] Fix | Delete
}, buildDragConfig.current(config));
[16650] Fix | Delete
}
[16651] Fix | Delete
[16652] Fix | Delete
/**
[16653] Fix | Delete
* @private
[16654] Fix | Delete
* Abstract class for distance/angle-based gesture recongizers
[16655] Fix | Delete
*/
[16656] Fix | Delete
[16657] Fix | Delete
var DistanceAngleRecognizer = /*#__PURE__*/function (_Recognizer) {
[16658] Fix | Delete
_inheritsLoose(DistanceAngleRecognizer, _Recognizer);
[16659] Fix | Delete
[16660] Fix | Delete
function DistanceAngleRecognizer() {
[16661] Fix | Delete
return _Recognizer.apply(this, arguments) || this;
[16662] Fix | Delete
}
[16663] Fix | Delete
[16664] Fix | Delete
var _proto = DistanceAngleRecognizer.prototype;
[16665] Fix | Delete
[16666] Fix | Delete
_proto.getInternalMovement = function getInternalMovement(values, state) {
[16667] Fix | Delete
var prev_a = state.values[1]; // not be defined if ctrl+wheel is used for zoom only
[16668] Fix | Delete
[16669] Fix | Delete
var d = values[0],
[16670] Fix | Delete
_values$ = values[1],
[16671] Fix | Delete
a = _values$ === void 0 ? prev_a : _values$;
[16672] Fix | Delete
var delta_a = a - prev_a;
[16673] Fix | Delete
var next_turns = state.turns;
[16674] Fix | Delete
if (Math.abs(delta_a) > 270) next_turns += sign(delta_a);
[16675] Fix | Delete
return subV([d, a - 360 * next_turns], state.initial);
[16676] Fix | Delete
};
[16677] Fix | Delete
[16678] Fix | Delete
_proto.getKinematics = function getKinematics(values, event) {
[16679] Fix | Delete
var state = this.getMovement(values);
[16680] Fix | Delete
var turns = (values[1] - state._movement[1] - this.state.initial[1]) / 360;
[16681] Fix | Delete
var dt = event.timeStamp - this.state.timeStamp;
[16682] Fix | Delete
[16683] Fix | Delete
var _calculateAllKinemati = calculateAllKinematics(state.movement, state.delta, dt),
[16684] Fix | Delete
kinematics = _objectWithoutPropertiesLoose(_calculateAllKinemati, ["distance", "velocity"]);
[16685] Fix | Delete
[16686] Fix | Delete
return _extends({
[16687] Fix | Delete
turns: turns
[16688] Fix | Delete
}, state, kinematics);
[16689] Fix | Delete
};
[16690] Fix | Delete
[16691] Fix | Delete
_proto.mapStateValues = function mapStateValues(state) {
[16692] Fix | Delete
return {
[16693] Fix | Delete
da: state.values,
[16694] Fix | Delete
vdva: state.velocities
[16695] Fix | Delete
};
[16696] Fix | Delete
};
[16697] Fix | Delete
[16698] Fix | Delete
return DistanceAngleRecognizer;
[16699] Fix | Delete
}(Recognizer);
[16700] Fix | Delete
[16701] Fix | Delete
var ZOOM_CONSTANT = 7;
[16702] Fix | Delete
var WEBKIT_DISTANCE_SCALE_FACTOR = 260;
[16703] Fix | Delete
var PinchRecognizer = /*#__PURE__*/function (_DistanceAngleRecogni) {
[16704] Fix | Delete
_inheritsLoose(PinchRecognizer, _DistanceAngleRecogni);
[16705] Fix | Delete
[16706] Fix | Delete
function PinchRecognizer() {
[16707] Fix | Delete
var _this;
[16708] Fix | Delete
[16709] Fix | Delete
_this = _DistanceAngleRecogni.apply(this, arguments) || this;
[16710] Fix | Delete
_this.ingKey = 'pinching';
[16711] Fix | Delete
_this.stateKey = 'pinch';
[16712] Fix | Delete
[16713] Fix | Delete
_this.onPinchStart = function (event) {
[16714] Fix | Delete
addEventIds(_this.controller, event);
[16715] Fix | Delete
var touchIds = _this.controller.touchIds;
[16716] Fix | Delete
if (!_this.enabled) return;
[16717] Fix | Delete
[16718] Fix | Delete
if (_this.state._active) {
[16719] Fix | Delete
// check that the pointerIds that initiated the gesture
[16720] Fix | Delete
// are still enabled. This is useful for when the page
[16721] Fix | Delete
// loses track of the pointers (minifying gesture on iPad).
[16722] Fix | Delete
if (_this.state._pointerIds.every(function (id) {
[16723] Fix | Delete
return touchIds.has(id);
[16724] Fix | Delete
})) return; // something was wrong with the pointers but we let it go.
[16725] Fix | Delete
} // until we reach two fingers on the target don't react
[16726] Fix | Delete
[16727] Fix | Delete
[16728] Fix | Delete
if (touchIds.size < 2) return;
[16729] Fix | Delete
[16730] Fix | Delete
var _pointerIds = Array.from(touchIds).slice(0, 2);
[16731] Fix | Delete
[16732] Fix | Delete
var _getTwoTouchesEventVa = getTwoTouchesEventValues(event, _pointerIds, _this.transform),
[16733] Fix | Delete
values = _getTwoTouchesEventVa.values,
[16734] Fix | Delete
origin = _getTwoTouchesEventVa.origin;
[16735] Fix | Delete
[16736] Fix | Delete
_this.updateSharedState(getGenericEventData(event));
[16737] Fix | Delete
[16738] Fix | Delete
_this.updateGestureState(_extends({}, getStartGestureState(_assertThisInitialized(_this), values, event), getGenericPayload(_assertThisInitialized(_this), event, true), {
[16739] Fix | Delete
_pointerIds: _pointerIds,
[16740] Fix | Delete
cancel: _this.onCancel,
[16741] Fix | Delete
origin: origin
[16742] Fix | Delete
}));
[16743] Fix | Delete
[16744] Fix | Delete
_this.updateGestureState(_this.getMovement(values));
[16745] Fix | Delete
[16746] Fix | Delete
_this.fireGestureHandler();
[16747] Fix | Delete
};
[16748] Fix | Delete
[16749] Fix | Delete
_this.onPinchChange = function (event) {
[16750] Fix | Delete
var _this$state = _this.state,
[16751] Fix | Delete
canceled = _this$state.canceled,
[16752] Fix | Delete
_active = _this$state._active;
[16753] Fix | Delete
if (canceled || !_active || // if the event has the same timestamp as the previous event
[16754] Fix | Delete
event.timeStamp === _this.state.timeStamp) return;
[16755] Fix | Delete
var genericEventData = getGenericEventData(event);
[16756] Fix | Delete
[16757] Fix | Delete
_this.updateSharedState(genericEventData);
[16758] Fix | Delete
[16759] Fix | Delete
try {
[16760] Fix | Delete
var _getTwoTouchesEventVa2 = getTwoTouchesEventValues(event, _this.state._pointerIds, _this.transform),
[16761] Fix | Delete
values = _getTwoTouchesEventVa2.values,
[16762] Fix | Delete
origin = _getTwoTouchesEventVa2.origin;
[16763] Fix | Delete
[16764] Fix | Delete
var kinematics = _this.getKinematics(values, event);
[16765] Fix | Delete
[16766] Fix | Delete
_this.updateGestureState(_extends({}, getGenericPayload(_assertThisInitialized(_this), event), kinematics, {
[16767] Fix | Delete
origin: origin
[16768] Fix | Delete
}));
[16769] Fix | Delete
[16770] Fix | Delete
_this.fireGestureHandler();
[16771] Fix | Delete
} catch (e) {
[16772] Fix | Delete
_this.onPinchEnd(event);
[16773] Fix | Delete
}
[16774] Fix | Delete
};
[16775] Fix | Delete
[16776] Fix | Delete
_this.onPinchEnd = function (event) {
[16777] Fix | Delete
removeEventIds(_this.controller, event);
[16778] Fix | Delete
var pointerIds = getTouchIds(event); // if none of the lifted pointerIds is in the state pointerIds don't do anything
[16779] Fix | Delete
[16780] Fix | Delete
if (_this.state._pointerIds.every(function (id) {
[16781] Fix | Delete
return !pointerIds.includes(id);
[16782] Fix | Delete
})) return;
[16783] Fix | Delete
[16784] Fix | Delete
_this.clean();
[16785] Fix | Delete
[16786] Fix | Delete
if (!_this.state._active) return;
[16787] Fix | Delete
[16788] Fix | Delete
_this.updateGestureState(_extends({}, getGenericPayload(_assertThisInitialized(_this), event), _this.getMovement(_this.state.values), {
[16789] Fix | Delete
_active: false
[16790] Fix | Delete
}));
[16791] Fix | Delete
[16792] Fix | Delete
_this.fireGestureHandler();
[16793] Fix | Delete
};
[16794] Fix | Delete
[16795] Fix | Delete
_this.onCancel = function () {
[16796] Fix | Delete
if (_this.state.canceled) return;
[16797] Fix | Delete
[16798] Fix | Delete
_this.updateGestureState({
[16799] Fix | Delete
_active: false,
[16800] Fix | Delete
canceled: true
[16801] Fix | Delete
});
[16802] Fix | Delete
[16803] Fix | Delete
setTimeout(function () {
[16804] Fix | Delete
return _this.fireGestureHandler();
[16805] Fix | Delete
}, 0);
[16806] Fix | Delete
};
[16807] Fix | Delete
/**
[16808] Fix | Delete
* PINCH WITH WEBKIT GESTURES
[16809] Fix | Delete
*/
[16810] Fix | Delete
[16811] Fix | Delete
[16812] Fix | Delete
_this.onGestureStart = function (event) {
[16813] Fix | Delete
if (!_this.enabled) return;
[16814] Fix | Delete
event.preventDefault();
[16815] Fix | Delete
var values = getWebkitGestureEventValues(event, _this.transform);
[16816] Fix | Delete
[16817] Fix | Delete
_this.updateSharedState(getGenericEventData(event));
[16818] Fix | Delete
[16819] Fix | Delete
_this.updateGestureState(_extends({}, getStartGestureState(_assertThisInitialized(_this), values, event), getGenericPayload(_assertThisInitialized(_this), event, true), {
[16820] Fix | Delete
origin: [event.clientX, event.clientY],
[16821] Fix | Delete
cancel: _this.onCancel
[16822] Fix | Delete
}));
[16823] Fix | Delete
[16824] Fix | Delete
_this.updateGestureState(_this.getMovement(values));
[16825] Fix | Delete
[16826] Fix | Delete
_this.fireGestureHandler();
[16827] Fix | Delete
};
[16828] Fix | Delete
[16829] Fix | Delete
_this.onGestureChange = function (event) {
[16830] Fix | Delete
var _this$state2 = _this.state,
[16831] Fix | Delete
canceled = _this$state2.canceled,
[16832] Fix | Delete
_active = _this$state2._active;
[16833] Fix | Delete
if (canceled || !_active) return;
[16834] Fix | Delete
event.preventDefault();
[16835] Fix | Delete
var genericEventData = getGenericEventData(event);
[16836] Fix | Delete
[16837] Fix | Delete
_this.updateSharedState(genericEventData); // this normalizes the values of the Safari's WebKitEvent by calculating
[16838] Fix | Delete
// the delta and then multiplying it by a constant.
[16839] Fix | Delete
[16840] Fix | Delete
[16841] Fix | Delete
var values = getWebkitGestureEventValues(event, _this.transform);
[16842] Fix | Delete
values[0] = (values[0] - _this.state.event.scale) * WEBKIT_DISTANCE_SCALE_FACTOR + _this.state.values[0];
[16843] Fix | Delete
[16844] Fix | Delete
var kinematics = _this.getKinematics(values, event);
[16845] Fix | Delete
[16846] Fix | Delete
_this.updateGestureState(_extends({}, getGenericPayload(_assertThisInitialized(_this), event), kinematics, {
[16847] Fix | Delete
origin: [event.clientX, event.clientY]
[16848] Fix | Delete
}));
[16849] Fix | Delete
[16850] Fix | Delete
_this.fireGestureHandler();
[16851] Fix | Delete
};
[16852] Fix | Delete
[16853] Fix | Delete
_this.onGestureEnd = function (event) {
[16854] Fix | Delete
_this.clean();
[16855] Fix | Delete
[16856] Fix | Delete
if (!_this.state._active) return;
[16857] Fix | Delete
[16858] Fix | Delete
_this.updateGestureState(_extends({}, getGenericPayload(_assertThisInitialized(_this), event), _this.getMovement(_this.state.values), {
[16859] Fix | Delete
_active: false,
[16860] Fix | Delete
origin: [event.clientX, event.clientY]
[16861] Fix | Delete
}));
[16862] Fix | Delete
[16863] Fix | Delete
_this.fireGestureHandler();
[16864] Fix | Delete
};
[16865] Fix | Delete
/**
[16866] Fix | Delete
* PINCH WITH WHEEL
[16867] Fix | Delete
*/
[16868] Fix | Delete
[16869] Fix | Delete
[16870] Fix | Delete
_this.wheelShouldRun = function (event) {
[16871] Fix | Delete
return _this.enabled && event.ctrlKey;
[16872] Fix | Delete
};
[16873] Fix | Delete
[16874] Fix | Delete
_this.getWheelValuesFromEvent = function (event) {
[16875] Fix | Delete
var _getWheelEventValues = getWheelEventValues(event, _this.transform),
[16876] Fix | Delete
delta_d = _getWheelEventValues[1];
[16877] Fix | Delete
[16878] Fix | Delete
var _this$state$values = _this.state.values,
[16879] Fix | Delete
prev_d = _this$state$values[0],
[16880] Fix | Delete
prev_a = _this$state$values[1]; // ZOOM_CONSTANT is based on Safari trackpad natural zooming
[16881] Fix | Delete
[16882] Fix | Delete
var _delta_d = -delta_d * ZOOM_CONSTANT; // new distance is the previous state distance added to the delta
[16883] Fix | Delete
[16884] Fix | Delete
[16885] Fix | Delete
var d = prev_d + _delta_d;
[16886] Fix | Delete
var a = prev_a !== void 0 ? prev_a : 0;
[16887] Fix | Delete
return {
[16888] Fix | Delete
values: [d, a],
[16889] Fix | Delete
origin: [event.clientX, event.clientY],
[16890] Fix | Delete
delta: [_delta_d, a]
[16891] Fix | Delete
};
[16892] Fix | Delete
};
[16893] Fix | Delete
[16894] Fix | Delete
_this.onWheel = function (event) {
[16895] Fix | Delete
if (!_this.wheelShouldRun(event)) return;
[16896] Fix | Delete
[16897] Fix | Delete
_this.setTimeout(_this.onWheelEnd);
[16898] Fix | Delete
[16899] Fix | Delete
if (!_this.state._active) _this.onWheelStart(event);else _this.onWheelChange(event);
[16900] Fix | Delete
};
[16901] Fix | Delete
[16902] Fix | Delete
_this.onWheelStart = function (event) {
[16903] Fix | Delete
var _this$getWheelValuesF = _this.getWheelValuesFromEvent(event),
[16904] Fix | Delete
values = _this$getWheelValuesF.values,
[16905] Fix | Delete
delta = _this$getWheelValuesF.delta,
[16906] Fix | Delete
origin = _this$getWheelValuesF.origin;
[16907] Fix | Delete
[16908] Fix | Delete
if (event.cancelable) event.preventDefault();else if (false) {}
[16909] Fix | Delete
[16910] Fix | Delete
_this.updateSharedState(getGenericEventData(event));
[16911] Fix | Delete
[16912] Fix | Delete
_this.updateGestureState(_extends({}, getStartGestureState(_assertThisInitialized(_this), values, event, _this.state.values), getGenericPayload(_assertThisInitialized(_this), event, true), {
[16913] Fix | Delete
offset: values,
[16914] Fix | Delete
delta: delta,
[16915] Fix | Delete
origin: origin
[16916] Fix | Delete
}));
[16917] Fix | Delete
[16918] Fix | Delete
_this.updateGestureState(_this.getMovement(values));
[16919] Fix | Delete
[16920] Fix | Delete
_this.fireGestureHandler();
[16921] Fix | Delete
};
[16922] Fix | Delete
[16923] Fix | Delete
_this.onWheelChange = function (event) {
[16924] Fix | Delete
if (event.cancelable) event.preventDefault();
[16925] Fix | Delete
[16926] Fix | Delete
_this.updateSharedState(getGenericEventData(event));
[16927] Fix | Delete
[16928] Fix | Delete
var _this$getWheelValuesF2 = _this.getWheelValuesFromEvent(event),
[16929] Fix | Delete
values = _this$getWheelValuesF2.values,
[16930] Fix | Delete
origin = _this$getWheelValuesF2.origin,
[16931] Fix | Delete
delta = _this$getWheelValuesF2.delta;
[16932] Fix | Delete
[16933] Fix | Delete
_this.updateGestureState(_extends({}, getGenericPayload(_assertThisInitialized(_this), event), _this.getKinematics(values, event), {
[16934] Fix | Delete
origin: origin,
[16935] Fix | Delete
delta: delta
[16936] Fix | Delete
}));
[16937] Fix | Delete
[16938] Fix | Delete
_this.fireGestureHandler();
[16939] Fix | Delete
};
[16940] Fix | Delete
[16941] Fix | Delete
_this.onWheelEnd = function () {
[16942] Fix | Delete
_this.clean();
[16943] Fix | Delete
[16944] Fix | Delete
if (!_this.state._active) return;
[16945] Fix | Delete
_this.state._active = false;
[16946] Fix | Delete
[16947] Fix | Delete
_this.updateGestureState(_this.getMovement(_this.state.values));
[16948] Fix | Delete
[16949] Fix | Delete
_this.fireGestureHandler();
[16950] Fix | Delete
};
[16951] Fix | Delete
[16952] Fix | Delete
return _this;
[16953] Fix | Delete
}
[16954] Fix | Delete
[16955] Fix | Delete
var _proto = PinchRecognizer.prototype;
[16956] Fix | Delete
[16957] Fix | Delete
_proto.addBindings = function addBindings$1(bindings) {
[16958] Fix | Delete
// Only try to use gesture events when they are supported and domTarget is set
[16959] Fix | Delete
// as React doesn't support gesture handlers.
[16960] Fix | Delete
if (this.controller.config.domTarget && !this.controller.supportsTouchEvents && this.controller.supportsGestureEvents) {
[16961] Fix | Delete
addBindings(bindings, 'onGestureStart', this.onGestureStart);
[16962] Fix | Delete
[16963] Fix | Delete
addBindings(bindings, 'onGestureChange', this.onGestureChange);
[16964] Fix | Delete
[16965] Fix | Delete
addBindings(bindings, 'onGestureEnd', this.onGestureEnd);
[16966] Fix | Delete
} else {
[16967] Fix | Delete
addBindings(bindings, 'onTouchStart', this.onPinchStart);
[16968] Fix | Delete
[16969] Fix | Delete
addBindings(bindings, 'onTouchMove', this.onPinchChange);
[16970] Fix | Delete
[16971] Fix | Delete
addBindings(bindings, 'onTouchEnd', this.onPinchEnd);
[16972] Fix | Delete
[16973] Fix | Delete
addBindings(bindings, 'onTouchCancel', this.onPinchEnd);
[16974] Fix | Delete
[16975] Fix | Delete
addBindings(bindings, 'onWheel', this.onWheel);
[16976] Fix | Delete
}
[16977] Fix | Delete
};
[16978] Fix | Delete
[16979] Fix | Delete
return PinchRecognizer;
[16980] Fix | Delete
}(DistanceAngleRecognizer);
[16981] Fix | Delete
[16982] Fix | Delete
/**
[16983] Fix | Delete
* Pinch hook.
[16984] Fix | Delete
*
[16985] Fix | Delete
* @param handler - the function fired every time the pinch gesture updates
[16986] Fix | Delete
* @param [config={}] - the config object including generic options and pinch options
[16987] Fix | Delete
*/
[16988] Fix | Delete
[16989] Fix | Delete
function usePinch(handler, config) {
[16990] Fix | Delete
if (config === void 0) {
[16991] Fix | Delete
config = {};
[16992] Fix | Delete
}
[16993] Fix | Delete
[16994] Fix | Delete
RecognizersMap.set('pinch', PinchRecognizer);
[16995] Fix | Delete
var buildPinchConfig = Object(external_React_["useRef"])();
[16996] Fix | Delete
[16997] Fix | Delete
if (!buildPinchConfig.current) {
[16998] Fix | Delete
buildPinchConfig.current = memoizeOne(_buildPinchConfig, isEqual);
[16999] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function