Некодим логотипНекодим
МодификацииПубликацииНекодИИмЦены
Некодим логотипНекодим

© 2020-2026 Некодим

Готовые модификации для вашего сайта. Улучшайте функциональность и дизайн без программирования.

Компания

  • Контакты
  • Публичная оферта
  • Политика конфиденциальности
  • Согласие на обработку данных
  • Лицензионное соглашение
  • Реферальная программа

Полезное

  • Модификации
  • Публикации
  • Каталог блоков Tilda
  • MCP для агентов
  • Журнал изменений
  • Доска почёта

Личный кабинет

  • Вход
  • Регистрация
  • Цены
Журнал измененийИстория GitФайлыTilda MCP
Каталог файлов

hammer.js

Код файла
Версия от 18.08.2026, 07:00:16 МСК
Оригинал на CDNСнимок 56c3b845Полный текст
2201          [PinchRecognizer, {enable: false}, ['rotate']],2202          [SwipeRecognizer, {direction: DIRECTION_HORIZONTAL}],2203          [PanRecognizer, {direction: DIRECTION_HORIZONTAL}, ['swipe']],2204          [TapRecognizer],2205          [TapRecognizer, {event: 'doubletap', taps: 2}, ['tap']],2206          [PressRecognizer]2207      ],2208  2209      /**2210       * Some CSS properties can be used to improve the working of Hammer.2211       * Add them to this method and they will be set when creating a new Manager.
История файла и сравнение версий
  • 18.08.2026, 07:00:16 · 56c3b845
2212
* @namespace
2213 */
2214 cssProps: {
2215 /**
2216 * Disables text selection to improve the dragging gesture. Mainly for desktop browsers.
2217 * @type {String}
2218 * @default 'none'
2219 */
2220 userSelect: 'none',
2221
2222 /**
2223 * Disable the Windows Phone grippers when pressing an element.
2224 * @type {String}
2225 * @default 'none'
2226 */
2227 touchSelect: 'none',
2228
2229 /**
2230 * Disables the default callout shown when you touch and hold a touch target.
2231 * On iOS, when you touch and hold a touch target such as a link, Safari displays
2232 * a callout containing information about the link. This property allows you to disable that callout.
2233 * @type {String}
2234 * @default 'none'
2235 */
2236 touchCallout: 'none',
2237
2238 /**
2239 * Specifies whether zooming is enabled. Used by IE10>
2240 * @type {String}
2241 * @default 'none'
2242 */
2243 contentZooming: 'none',
2244
2245 /**
2246 * Specifies that an entire element should be draggable instead of its contents. Mainly for desktop browsers.
2247 * @type {String}
2248 * @default 'none'
2249 */
2250 userDrag: 'none',
2251
2252 /**
2253 * Overrides the highlight color shown when the user taps a link or a JavaScript
2254 * clickable element in iOS. This property obeys the alpha value, if specified.
2255 * @type {String}
2256 * @default 'rgba(0,0,0,0)'
2257 */
2258 tapHighlightColor: 'rgba(0,0,0,0)'
2259 }
2260 };
2261
2262 var STOP = 1;
2263 var FORCED_STOP = 2;
2264
2265 /**
2266 * Manager
2267 * @param {HTMLElement} element
2268 * @param {Object} [options]
2269 * @constructor
2270 */
2271 function Manager(element, options) {
2272 this.options = assign({}, Hammer.defaults, options || {});
2273
2274 this.options.inputTarget = this.options.inputTarget || element;
2275
2276 this.handlers = {};
2277 this.session = {};
2278 this.recognizers = [];
2279 this.oldCssProps = {};
2280
2281 this.element = element;
2282 this.input = createInputInstance(this);
2283 this.touchAction = new TouchAction(this, this.options.touchAction);
2284
2285 toggleCssProps(this, true);
2286
2287 each(this.options.recognizers, function(item) {
2288 var recognizer = this.add(new (item[0])(item[1]));
2289 item[2] && recognizer.recognizeWith(item[2]);
2290 item[3] && recognizer.requireFailure(item[3]);
2291 }, this);
2292 }
2293
2294 Manager.prototype = {
2295 /**
2296 * set options
2297 * @param {Object} options
2298 * @returns {Manager}
2299 */
2300 set: function(options) {
Предыдущие 100 строкСледующие 100 строк