* create new input type manager * called by the Manager constructor * @param {Hammer} manager * @returns {Input}
(manager)
| 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 |