* create new input type manager * @param {Manager} manager * @param {Function} callback * @returns {Input} * @constructor
(manager, callback)
| 92794 | * @returns {Input} |
| 92795 | * @constructor |
| 92796 | */ function Input(manager, callback) { |
| 92797 | var self = this; |
| 92798 | this.manager = manager; |
| 92799 | this.callback = callback; |
| 92800 | this.element = manager.element; |
| 92801 | this.target = manager.options.inputTarget; |
| 92802 | // smaller wrapper around the handler, for the scope and the enabled state of the manager, |
| 92803 | // so when disabled the input events are completely bypassed. |
| 92804 | this.domHandler = function(ev) { |
| 92805 | if (boolOrFn(manager.options.enable, [ |
| 92806 | manager |
| 92807 | ])) self.handler(ev); |
| 92808 | }; |
| 92809 | this.init(); |
| 92810 | } |
| 92811 | Input.prototype = { |
| 92812 | /** |
| 92813 | * should handle the inputEvent data and trigger the callback |