efront 4.29.0 → 4.29.1
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/{frame → pivot}/login.xht +1 -1
- package/coms/zimoli/contextmenu.js +8 -0
- package/coms/zimoli/on.js +16 -6
- package/coms/zimoli/zimoli.js +3 -3
- package/package.json +2 -2
- package/public/efront.js +1 -1
- package/public//346/226/207/344/273/266/347/263/273/347/273/237//344/270/273/351/241/265.jsp +45 -0
- package/apps//346/226/207/344/273/266/347/263/273/347/273/237/main.js +0 -55
- package/apps//346/226/207/344/273/266/347/263/273/347/273/237//344/270/273/351/241/265.jsp +0 -42
- package/apps//346/226/207/344/273/266/347/263/273/347/273/237//350/265/204/346/272/220/347/256/241/347/220/206/345/231/250.js +0 -1
|
@@ -47,6 +47,7 @@ function contextmenu(target, menuItems) {
|
|
|
47
47
|
start(event) {
|
|
48
48
|
if (event.defaultPrevented || event.type === 'mousedown') return;
|
|
49
49
|
clearTimeout(menuHandle);
|
|
50
|
+
if (tm) remove(tm);
|
|
50
51
|
menuHandle = setTimeout(function () {
|
|
51
52
|
var e = createEvent("contextmenu", true);
|
|
52
53
|
e.clientX = event.clientX;
|
|
@@ -77,8 +78,15 @@ function contextmenu(target, menuItems) {
|
|
|
77
78
|
if (document.activeElement === this) return;
|
|
78
79
|
_remove(this);
|
|
79
80
|
}, 60);
|
|
81
|
+
var lastMenuTime = 0;
|
|
80
82
|
on("contextmenu")(target, function (event) {
|
|
81
83
|
if (event.defaultPrevented) return;
|
|
84
|
+
var now = +new Date;
|
|
85
|
+
if (lastMenuTime + 300 > now) {
|
|
86
|
+
event.preventDefault();
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
lastMenuTime = now;
|
|
82
90
|
event.preventDefault();
|
|
83
91
|
if (tm) remove(tm), tm = null;
|
|
84
92
|
tm = showContext(event);
|
package/coms/zimoli/on.js
CHANGED
|
@@ -491,24 +491,34 @@ var invoke = function (event, type, pointerType) {
|
|
|
491
491
|
var onclick = on("click");
|
|
492
492
|
var onmousedown = on("mousedown");
|
|
493
493
|
var onmousemove = on("mousemove");
|
|
494
|
-
var
|
|
494
|
+
var mouseX, mouseY, touchX, touchY, lasttime_click;
|
|
495
495
|
var needFireClick = false;
|
|
496
496
|
var isClickWithPointer = false;
|
|
497
497
|
var touchendFired = false;
|
|
498
|
-
function clickstart(
|
|
498
|
+
function clickstart() {
|
|
499
499
|
needFireClick = true;
|
|
500
500
|
touchendFired = false;
|
|
501
501
|
isClickWithPointer = true;
|
|
502
502
|
onclick.preventClick = false;
|
|
503
|
-
pointerX = event.clientX, pointerY = event.clientY;
|
|
504
503
|
}
|
|
505
504
|
var dis = (a, b) => a * a + b * b
|
|
506
505
|
function clickcancel(event) {
|
|
507
|
-
if (!event
|
|
506
|
+
if (!event
|
|
507
|
+
|| event.touches && dis(event.clientX - touchX, event.clientY - touchY) >= MOVELOCK_DELTA * MOVELOCK_DELTA
|
|
508
|
+
|| event.which && dis(event.clientX - mouseX, event.clientY - mouseY) >= MOVELOCK_DELTA * MOVELOCK_DELTA
|
|
509
|
+
) {
|
|
508
510
|
onclick.preventClick = true;
|
|
509
511
|
}
|
|
510
512
|
}
|
|
511
|
-
|
|
513
|
+
function mousestart(event) {
|
|
514
|
+
clickstart();
|
|
515
|
+
mouseX = event.clientX, mouseY = event.clientY;
|
|
516
|
+
}
|
|
517
|
+
function touchstart(event) {
|
|
518
|
+
clickstart();
|
|
519
|
+
touchX = event.clientX, touchY = event.clientY;
|
|
520
|
+
}
|
|
521
|
+
onmousedown(window, mousestart, true);
|
|
512
522
|
|
|
513
523
|
onmousemove(window, clickcancel, true);
|
|
514
524
|
if (window.addEventListener) {
|
|
@@ -522,7 +532,7 @@ var invoke = function (event, type, pointerType) {
|
|
|
522
532
|
return;
|
|
523
533
|
}
|
|
524
534
|
extendTouchEvent(event);
|
|
525
|
-
|
|
535
|
+
touchstart.call(this, event);
|
|
526
536
|
}, true);
|
|
527
537
|
window.addEventListener("touchend", function (event) {
|
|
528
538
|
if (event.touches.length > 1) return;
|
package/coms/zimoli/zimoli.js
CHANGED
|
@@ -382,11 +382,11 @@ function create(pagepath, args, from, needroles, zimolidata) {
|
|
|
382
382
|
_pageback_listener = handler;
|
|
383
383
|
};
|
|
384
384
|
var _page = pg.call(state, args, from);
|
|
385
|
-
_page.realpath = state.realpath;
|
|
386
|
-
_page.basepath = state.basepath;
|
|
387
|
-
_page.pagepath = pagepath;
|
|
388
385
|
if (undefined === args || null === args) args = {};
|
|
389
386
|
if (_page) {
|
|
387
|
+
_page.realpath = state.realpath;
|
|
388
|
+
_page.basepath = state.basepath;
|
|
389
|
+
_page.pagepath = pagepath;
|
|
390
390
|
var page_with = _with_elements.splice(_with_length, _with_elements.length - _with_length);
|
|
391
391
|
if (_page.with && _page.with !== _with_elements) {
|
|
392
392
|
page_with = page_with.concat(_page.with);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "efront",
|
|
3
|
-
"version": "4.29.
|
|
3
|
+
"version": "4.29.1",
|
|
4
4
|
"description": "一个开发环境,提供一种自由的前端开发模式,也可作为辅助工具使用。",
|
|
5
5
|
"main": "public/efront.js",
|
|
6
6
|
"directories": {
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"efront": "public/efront.js"
|
|
11
11
|
},
|
|
12
12
|
"scripts": {
|
|
13
|
-
"prepack": "node tools/build-efront.js --node --no-target"
|
|
13
|
+
"prepack": "node tools/build-efront.js --node --no-target&node public/efront build 文件系统.html"
|
|
14
14
|
},
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|