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