浏览代码

BUGFIX: Operations can now be dragged out of the recipe on touchscreen devices.

n1474335 8 年之前
父节点
当前提交
ed7cab36d2
共有 5 个文件被更改,包括 12 次插入5 次删除
  1. 0 0
      build/prod/cyberchef.htm
  2. 0 0
      build/prod/index.html
  3. 0 0
      build/prod/scripts.js
  4. 7 0
      src/js/views/html/RecipeWaiter.js
  5. 5 5
      src/static/stats.txt

文件差异内容过多而无法显示
+ 0 - 0
build/prod/cyberchef.htm


文件差异内容过多而无法显示
+ 0 - 0
build/prod/index.html


文件差异内容过多而无法显示
+ 0 - 0
build/prod/scripts.js


+ 7 - 0
src/js/views/html/RecipeWaiter.js

@@ -52,6 +52,13 @@ RecipeWaiter.prototype.initialise_operation_drag_n_drop = function() {
         this.remove_intent = true;
         this.app.progress = 0;
     }.bind(this));
+
+    Sortable.utils.on(rec_list, "touchend", function(e) {
+        var loc = e.changedTouches[0],
+            target = document.elementFromPoint(loc.clientX, loc.clientY);
+
+        this.remove_intent = !rec_list.contains(target);
+    }.bind(this));
     
     // Favourites category
     document.querySelector("#categories a").addEventListener("dragover", this.fav_dragover.bind(this));

+ 5 - 5
src/static/stats.txt

@@ -1,9 +1,9 @@
-203	source files
-104274	lines
+202	source files
+104281	lines
 4.0M	size
 
 136	JavaScript source files
-95184	lines
+95191	lines
 3.5M	size
 
 78	third party JavaScript source files
@@ -11,10 +11,10 @@
 2.7M	size
 
 58	first party JavaScript source files
-18807	lines
+18814	lines
 728K	size
 
-3.1M	uncompressed JavaScript size
+3.2M	uncompressed JavaScript size
 1.7M	compressed JavaScript size
 
 15	categories

部分文件因为文件数量过多而无法显示