69ce664b1e66d48ae3ae5be08488f38b4855fc8bSatyen Desai
69ce664b1e66d48ae3ae5be08488f38b4855fc8bSatyen Desai /*
69ce664b1e66d48ae3ae5be08488f38b4855fc8bSatyen Desai * This module is the conditional loaded DD file to support gesture events.
69ce664b1e66d48ae3ae5be08488f38b4855fc8bSatyen Desai * In the event that DD is loaded onto a device that support touch based events
69ce664b1e66d48ae3ae5be08488f38b4855fc8bSatyen Desai * This module is loaded and over rides 2 key methods on DD.Drag and DD.DDM to
69ce664b1e66d48ae3ae5be08488f38b4855fc8bSatyen Desai * attach the gesture events.
69ce664b1e66d48ae3ae5be08488f38b4855fc8bSatyen Desai */
69ce664b1e66d48ae3ae5be08488f38b4855fc8bSatyen Desai Y.log('Drag gesture support loaded', 'info', 'drag-gestures');
69ce664b1e66d48ae3ae5be08488f38b4855fc8bSatyen Desai
69ce664b1e66d48ae3ae5be08488f38b4855fc8bSatyen Desai Y.DD.Drag.START_EVENT = 'gesturemovestart';
69ce664b1e66d48ae3ae5be08488f38b4855fc8bSatyen Desai
eaa9719567e2ec55d96f9298077f5fc0effe1ed3Satyen Desai Y.DD.Drag.prototype._prep = function() {
69ce664b1e66d48ae3ae5be08488f38b4855fc8bSatyen Desai Y.log('Using DD override prep to attach gesture events', 'info', 'drag-gestures');
69ce664b1e66d48ae3ae5be08488f38b4855fc8bSatyen Desai this._dragThreshMet = false;
86fa3fa071113dfe732100d1a15cb149f67ffc83Jenny Donnelly var node = this.get('node'), DDM = Y.DD.DDM;
86fa3fa071113dfe732100d1a15cb149f67ffc83Jenny Donnelly
86fa3fa071113dfe732100d1a15cb149f67ffc83Jenny Donnelly node.addClass(DDM.CSS_PREFIX + '-draggable');
86fa3fa071113dfe732100d1a15cb149f67ffc83Jenny Donnelly
86fa3fa071113dfe732100d1a15cb149f67ffc83Jenny Donnelly node.on(Y.DD.Drag.START_EVENT, Y.bind(this._handleMouseDownEvent, this), {
69ce664b1e66d48ae3ae5be08488f38b4855fc8bSatyen Desai minDistance: 0,
69ce664b1e66d48ae3ae5be08488f38b4855fc8bSatyen Desai minTime: 0
69ce664b1e66d48ae3ae5be08488f38b4855fc8bSatyen Desai });
69ce664b1e66d48ae3ae5be08488f38b4855fc8bSatyen Desai
69ce664b1e66d48ae3ae5be08488f38b4855fc8bSatyen Desai node.on('gesturemoveend', Y.bind(this._handleMouseUp, this), { standAlone: true });
10d8bafc5c24f3a4285cf6060a1935ba5cfc4b85Luke Smith node.on('dragstart', Y.bind(this._fixDragStart, this));
69ce664b1e66d48ae3ae5be08488f38b4855fc8bSatyen Desai
Error!

 

There was an error!

null

java.lang.NullPointerException