MCPcopy Create free account
hub / github.com/microsoft/SandDance / Manager

Function Manager

docs/app/js/sanddance-app.js:94202–94218  ·  view source on GitHub ↗

* Manager * @param {HTMLElement} element * @param {Object} [options] * @constructor

(element, options)

Source from the content-addressed store, hash-verified

94200 * @param {Object} [options]
94201 * @constructor
94202 */ function Manager(element, options) {
94203 this.options = assign({}, Hammer.defaults, options || {});
94204 this.options.inputTarget = this.options.inputTarget || element;
94205 this.handlers = {};
94206 this.session = {};
94207 this.recognizers = [];
94208 this.oldCssProps = {};
94209 this.element = element;
94210 this.input = createInputInstance(this);
94211 this.touchAction = new TouchAction(this, this.options.touchAction);
94212 toggleCssProps(this, true);
94213 each(this.options.recognizers, function(item) {
94214 var recognizer = this.add(new item[0](item[1]));
94215 item[2] && recognizer.recognizeWith(item[2]);
94216 item[3] && recognizer.requireFailure(item[3]);
94217 }, this);
94218 }
94219 Manager.prototype = {
94220 /**
94221 * set options

Callers

nothing calls this directly

Calls 5

assignFunction · 0.85
createInputInstanceFunction · 0.70
toggleCssPropsFunction · 0.70
eachFunction · 0.70
addMethod · 0.45

Tested by

no test coverage detected