(scheduler2)
| 7140 | </div></div><div class='dhx_cal_larea'></div>`; |
| 7141 | } |
| 7142 | function extend$5(scheduler2) { |
| 7143 | scheduler2._init_touch_events = function() { |
| 7144 | var mobile = this.config.touch && ((navigator.userAgent.indexOf("Mobile") != -1 || navigator.userAgent.indexOf("iPad") != -1 || navigator.userAgent.indexOf("Android") != -1 || navigator.userAgent.indexOf("Touch") != -1) && !window.MSStream) || navigator.platform === "MacIntel" && navigator.maxTouchPoints > 1; |
| 7145 | if (mobile) { |
| 7146 | this.xy.scroll_width = 0; |
| 7147 | this._mobile = true; |
| 7148 | } |
| 7149 | if (this.config.touch) { |
| 7150 | var touchEventsSupported = true; |
| 7151 | try { |
| 7152 | document.createEvent("TouchEvent"); |
| 7153 | } catch (e) { |
| 7154 | touchEventsSupported = false; |
| 7155 | } |
| 7156 | if (touchEventsSupported) { |
| 7157 | this._touch_events(["touchmove", "touchstart", "touchend"], function(ev) { |
| 7158 | if (ev.touches && ev.touches.length > 1) |
| 7159 | return null; |
| 7160 | if (ev.touches[0]) |
| 7161 | return { target: ev.target, pageX: ev.touches[0].pageX, pageY: ev.touches[0].pageY, clientX: ev.touches[0].clientX, clientY: ev.touches[0].clientY }; |
| 7162 | else |
| 7163 | return ev; |
| 7164 | }, function() { |
| 7165 | return false; |
| 7166 | }); |
| 7167 | } else if (window.PointerEvent || window.navigator.pointerEnabled) { |
| 7168 | this._touch_events(["pointermove", "pointerdown", "pointerup"], function(ev) { |
| 7169 | if (ev.pointerType == "mouse") |
| 7170 | return null; |
| 7171 | return ev; |
| 7172 | }, function(ev) { |
| 7173 | return !ev || ev.pointerType == "mouse"; |
| 7174 | }); |
| 7175 | } else if (window.navigator.msPointerEnabled) { |
| 7176 | this._touch_events(["MSPointerMove", "MSPointerDown", "MSPointerUp"], function(ev) { |
| 7177 | if (ev.pointerType == ev.MSPOINTER_TYPE_MOUSE) |
| 7178 | return null; |
| 7179 | return ev; |
| 7180 | }, function(ev) { |
| 7181 | return !ev || ev.pointerType == ev.MSPOINTER_TYPE_MOUSE; |
| 7182 | }); |
| 7183 | } |
| 7184 | } |
| 7185 | }; |
| 7186 | scheduler2._touch_events = function(names, accessor, ignore) { |
| 7187 | var source, tracker, timer, drag_mode, scroll_mode, action_mode; |
| 7188 | var dblclicktime = 0; |
| 7189 | function attachTouchEvent(element, name, callback) { |
| 7190 | scheduler2.event(element, name, function(e) { |
| 7191 | if (scheduler2._is_lightbox_open()) { |
| 7192 | return true; |
| 7193 | } else { |
| 7194 | if (ignore(e)) |
| 7195 | return; |
| 7196 | return callback(e); |
| 7197 | } |
| 7198 | }, { passive: false }); |
| 7199 | } |
no test coverage detected