efront 3.35.8 → 3.35.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/coms/basic/sortname.js +2 -2
- package/coms/zimoli/bindtouch.js +4 -2
- package/coms/zimoli/on.js +12 -14
- package/coms/zimoli/zimoli.js +2 -6
- package/package.json +1 -1
- package/public/efront.js +1 -1
package/coms/basic/sortname.js
CHANGED
|
@@ -85,8 +85,8 @@ var parse干支 = function (a) {
|
|
|
85
85
|
};
|
|
86
86
|
var compare = function (a, b) {
|
|
87
87
|
for (var cx1 = a.length - 1, cx2 = b.length - 1; cx1 >= 0 && cx2 >= 0; cx1--, cx2--) {
|
|
88
|
-
while (
|
|
89
|
-
while (
|
|
88
|
+
while (/[\s\u00a0]/.test(a[cx1])) cx1--;
|
|
89
|
+
while (/[\s\u00a0]/.test(b[cx2])) cx2--;
|
|
90
90
|
if (a[cx1] !== b[cx2] || a[cx1] in map子丑寅 || a[cx1] in map上中下 || a[cx1] in map一二三 || a in power || /^\d$/.test(a[cx1])) break;
|
|
91
91
|
}
|
|
92
92
|
a = a.slice(0, cx1 + 1);
|
package/coms/zimoli/bindtouch.js
CHANGED
|
@@ -43,8 +43,10 @@ function bindtouch(target, bindder, lockDirection = false) {
|
|
|
43
43
|
var pos = move.call(this, null, event);
|
|
44
44
|
if (isObject(pos)) {
|
|
45
45
|
var { x = 0, y = 0 } = pos;
|
|
46
|
-
if (isFunction(move)) {
|
|
47
|
-
|
|
46
|
+
a: if (isFunction(move)) {
|
|
47
|
+
pos = move.call(this, { x: x + deltax, y: y + deltay, deltax, deltay }, event);
|
|
48
|
+
if (!pos) break a;
|
|
49
|
+
var { x: x1, y: y1 } = pos;
|
|
48
50
|
if (x1 !== x) saved_x += x1 - x;
|
|
49
51
|
if (y1 !== y) saved_y += y1 - y;
|
|
50
52
|
}
|
package/coms/zimoli/on.js
CHANGED
|
@@ -459,37 +459,35 @@ var invoke = function (event, type, pointerType) {
|
|
|
459
459
|
var onclick = on("click");
|
|
460
460
|
var onmousedown = on("mousedown");
|
|
461
461
|
var onmousemove = on("mousemove");
|
|
462
|
-
var
|
|
462
|
+
var pointerX, pointerY, lasttime_click;
|
|
463
463
|
var needFireClick = false;
|
|
464
464
|
var isClickWithPointer = false;
|
|
465
465
|
var touchendFired = false;
|
|
466
|
-
function clickstart() {
|
|
466
|
+
function clickstart(event) {
|
|
467
467
|
needFireClick = true;
|
|
468
468
|
touchendFired = false;
|
|
469
469
|
isClickWithPointer = true;
|
|
470
470
|
onclick.preventClick = false;
|
|
471
|
+
pointerX = event.clientX, pointerY = event.clientY;
|
|
471
472
|
}
|
|
472
473
|
var abs = Math.abs;
|
|
473
|
-
function clickcancel() {
|
|
474
|
-
onclick.preventClick = true;
|
|
474
|
+
function clickcancel(event) {
|
|
475
|
+
if (!event || abs(event.clientX - pointerX) >= MOVELOCK_DELTA || abs(event.clientY - pointerY) >= MOVELOCK_DELTA) onclick.preventClick = true;
|
|
475
476
|
}
|
|
476
|
-
onmousedown(window,
|
|
477
|
-
lasttime_click = event.timeStamp;
|
|
478
|
-
mouse_x = event.clientX, mouse_y = event.clientY;
|
|
479
|
-
clickstart.call(this, event);
|
|
480
|
-
});
|
|
477
|
+
onmousedown(window, clickstart);
|
|
481
478
|
|
|
482
|
-
onmousemove(window,
|
|
483
|
-
if (abs(event.clientX - mouse_x) >= MOVELOCK_DELTA || abs(event.clientY - mouse_y) >= MOVELOCK_DELTA)
|
|
484
|
-
clickcancel.call(this, event);
|
|
485
|
-
});
|
|
479
|
+
onmousemove(window, clickcancel);
|
|
486
480
|
if (window.addEventListener) {
|
|
487
|
-
window.addEventListener("touchmove",
|
|
481
|
+
window.addEventListener("touchmove", function (event) {
|
|
482
|
+
extendTouchEvent(event);
|
|
483
|
+
clickcancel.call(this, event);
|
|
484
|
+
}, true);
|
|
488
485
|
window.addEventListener("touchstart", function (event) {
|
|
489
486
|
if (event.touches.length > 1) {
|
|
490
487
|
clickcancel();
|
|
491
488
|
return;
|
|
492
489
|
}
|
|
490
|
+
extendTouchEvent(event);
|
|
493
491
|
clickstart.call(this, event);
|
|
494
492
|
}, true);
|
|
495
493
|
window.addEventListener("touchend", function (event) {
|
package/coms/zimoli/zimoli.js
CHANGED
|
@@ -492,7 +492,7 @@ try {
|
|
|
492
492
|
} catch (e) {
|
|
493
493
|
}
|
|
494
494
|
var root_path;
|
|
495
|
-
var pushstate = function (path_name, history_name
|
|
495
|
+
var pushstate = function (path_name, history_name) {
|
|
496
496
|
var isDestroy = false;
|
|
497
497
|
if (history_name === undefined) {
|
|
498
498
|
history_name = current_history;
|
|
@@ -502,10 +502,6 @@ var pushstate = function (path_name, history_name, oldpagepath) {
|
|
|
502
502
|
history[history_name] = [path_name];
|
|
503
503
|
} else {
|
|
504
504
|
var _history = history[history_name];
|
|
505
|
-
if (oldpagepath && [].indexOf.call(_history, oldpagepath, 0) < 0) {
|
|
506
|
-
_history.splice(root_path === _history[0], _history.length);
|
|
507
|
-
isDestroy = true;
|
|
508
|
-
}
|
|
509
505
|
for (var cx = 0, dx = _history.length; cx < dx; cx++) {
|
|
510
506
|
if (_history[cx] === path_name) {
|
|
511
507
|
_history.splice(cx, dx - cx);
|
|
@@ -746,7 +742,7 @@ zimoli.enableTouchBack = function () {
|
|
|
746
742
|
end() {
|
|
747
743
|
if (ratio === null || !touchTarget) return;
|
|
748
744
|
if (deltaX > 0 && ratio > .1 || deltaX < 0 && ratio > .9 || deltaX === 0 && ratio > .4) {
|
|
749
|
-
pushstate(historyList[historyList.length - 2]);
|
|
745
|
+
pushstate(historyList[historyList.length - 2], history_name);
|
|
750
746
|
remove(currentTarget);
|
|
751
747
|
transition(touchTarget, 1);
|
|
752
748
|
global[history_name] = touchTarget;
|