clean related files when deleting items
This commit is contained in:
parent
0902f2ce98
commit
419975b71e
10 changed files with 13 additions and 12 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
1
dashboard-ui/bower_components/emby-webcomponents/touchhelper.js
vendored
Normal file
1
dashboard-ui/bower_components/emby-webcomponents/touchhelper.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
define(["dom","events"],function(dom,events){"use strict";function getTouches(e){return e.changedTouches||e.targetTouches||e.touches}function TouchHelper(elem){var touchTarget,touchStartX,touchStartY,self=this,swipeXThreshold=50,swipeXMaxY=30,touchStart=function(e){var touch=getTouches(e)[0];touchTarget=null,touchStartX=0,touchStartY=0,touch&&(touchStartX=touch.clientX,touchStartY=touch.clientY,touchTarget=touch.target)},touchEnd=function(e){if(touchTarget){var deltaX,deltaY,touch=getTouches(e)[0];if(touch){var touchEndX=touch.clientX||0,touchEndY=touch.clientY||0;deltaX=touchEndX-(touchStartX||0),deltaY=touchEndY-(touchStartY||0)}else deltaX=0,deltaY=0;deltaX>swipeXThreshold&&Math.abs(deltaY)<swipeXMaxY?events.trigger(self,"swiperight",[touchTarget]):deltaX<0-swipeXThreshold&&Math.abs(deltaY)<swipeXMaxY&&events.trigger(self,"swipeleft",[touchTarget])}touchTarget=null,touchStartX=0,touchStartY=0};this.touchStart=touchStart,this.touchEnd=touchEnd,dom.addEventListener(elem,"touchstart",touchStart,{passive:!0}),dom.addEventListener(elem,"touchend",touchEnd,{passive:!0}),dom.addEventListener(elem,"touchcancel",touchEnd,{passive:!0})}return TouchHelper.prototype.destroy=function(){var elem=this.elem,touchStart=this.touchStart,touchEnd=this.touchEnd;dom.removeEventListener(elem,"touchstart",touchStart,{passive:!0}),dom.removeEventListener(elem,"touchend",touchEnd,{passive:!0}),dom.removeEventListener(elem,"touchcancel",touchEnd,{passive:!0}),this.touchStart=null,this.touchEnd=null,this.elem=null},TouchHelper});
|
Loading…
Add table
Add a link
Reference in a new issue