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

Function createInputInstance

docs/tests/v2/es6/js/sanddance.js:51824–51841  ·  view source on GitHub ↗

* create new input type manager * called by the Manager constructor * @param {Hammer} manager * @returns {Input}

(manager)

Source from the content-addressed store, hash-verified

51822 */
51823
51824 function createInputInstance(manager) {
51825 var Type;
51826 var inputClass = manager.options.inputClass;
51827
51828 if (inputClass) {
51829 Type = inputClass;
51830 } else if (SUPPORT_POINTER_EVENTS) {
51831 Type = PointerEventInput;
51832 } else if (SUPPORT_ONLY_TOUCH) {
51833 Type = TouchInput;
51834 } else if (!SUPPORT_TOUCH) {
51835 Type = MouseInput;
51836 } else {
51837 Type = TouchMouseInput;
51838 }
51839
51840 return new Type(manager, inputHandler);
51841 }
51842 /**
51843 * handle input events
51844 * @param {Manager} manager

Callers 1

ManagerFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected