clickgo 3.16.26 → 3.16.28
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/README.md +1 -1
- package/dist/app/demo/app.js +4 -16
- package/dist/app/demo/config.json +4 -1
- package/dist/app/demo/form/control/arteditor/arteditor.js +7 -18
- package/dist/app/demo/form/control/button/button.js +2 -13
- package/dist/app/demo/form/control/check/check.js +3 -14
- package/dist/app/demo/form/control/content/content.js +3 -14
- package/dist/app/demo/form/control/daterange/daterange.js +1 -1
- package/dist/app/demo/form/control/delete/delete.js +3 -14
- package/dist/app/demo/form/control/dialog/dialog.js +2 -0
- package/dist/app/demo/form/control/dialog/dialog.xml +26 -12
- package/dist/app/demo/form/control/flow/flow.js +2 -13
- package/dist/app/demo/form/control/form/form.js +4 -15
- package/dist/app/demo/form/control/iconview/iconview.js +12 -29
- package/dist/app/demo/form/control/jodit/jodit.js +7 -18
- package/dist/app/demo/form/control/link/link.js +2 -13
- package/dist/app/demo/form/control/list/list.js +40 -52
- package/dist/app/demo/form/control/list/list.xml +20 -10
- package/dist/app/demo/form/control/map/map.js +17 -28
- package/dist/app/demo/form/control/menu/menu.js +6 -17
- package/dist/app/demo/form/control/mpegts/mpegts.js +1 -1
- package/dist/app/demo/form/control/nav/nav.js +6 -17
- package/dist/app/demo/form/control/novnc/novnc.js +75 -0
- package/dist/app/demo/form/control/novnc/novnc.xml +13 -0
- package/dist/app/demo/form/control/panel/panel.js +9 -20
- package/dist/app/demo/form/control/panel/test1.js +20 -41
- package/dist/app/demo/form/control/pdf/pdf.js +7 -20
- package/dist/app/demo/form/control/progress/progress.js +3 -12
- package/dist/app/demo/form/control/radio/radio.js +6 -17
- package/dist/app/demo/form/control/select/select.js +28 -41
- package/dist/app/demo/form/control/switch/switch.js +3 -14
- package/dist/app/demo/form/control/tab/tab.js +7 -18
- package/dist/app/demo/form/control/table/table.js +8 -23
- package/dist/app/demo/form/control/text/text.js +2 -13
- package/dist/app/demo/form/control/tuieditor/tuieditor.js +7 -18
- package/dist/app/demo/form/control/uploader/uploader.js +20 -31
- package/dist/app/demo/form/control/vflow/vflow.js +2 -13
- package/dist/app/demo/form/event/form/form.js +11 -22
- package/dist/app/demo/form/event/task/task.js +14 -29
- package/dist/app/demo/form/main.js +381 -387
- package/dist/app/demo/form/main.xml +3 -0
- package/dist/app/demo/form/method/acontrol/acontrol.js +2 -13
- package/dist/app/demo/form/method/aform/aform.js +41 -60
- package/dist/app/demo/form/method/aform/sd.js +3 -14
- package/dist/app/demo/form/method/core/core.js +25 -50
- package/dist/app/demo/form/method/dom/dom.js +35 -58
- package/dist/app/demo/form/method/form/form.js +106 -149
- package/dist/app/demo/form/method/fs/fs.js +126 -147
- package/dist/app/demo/form/method/native/native.js +44 -72
- package/dist/app/demo/form/method/storage/storage.js +9 -27
- package/dist/app/demo/form/method/system/system.js +16 -41
- package/dist/app/demo/form/method/task/task.js +18 -37
- package/dist/app/demo/form/method/theme/theme.js +39 -54
- package/dist/app/demo/form/method/tool/tool.js +22 -43
- package/dist/app/demo/form/method/tool/tool.xml +1 -1
- package/dist/app/demo/form/method/zip/zip.js +18 -29
- package/dist/app/demo/form/solution/backpanel/backpanel.js +10 -23
- package/dist/app/task/app.js +2 -13
- package/dist/app/task/form/bar/bar.js +32 -45
- package/dist/clickgo.js +1 -1
- package/dist/control/arteditor.cgc +0 -0
- package/dist/control/box.cgc +0 -0
- package/dist/control/captcha.cgc +0 -0
- package/dist/control/common.cgc +0 -0
- package/dist/control/desc.cgc +0 -0
- package/dist/control/drawer.cgc +0 -0
- package/dist/control/echarts.cgc +0 -0
- package/dist/control/form.cgc +0 -0
- package/dist/control/iconview.cgc +0 -0
- package/dist/control/jodit.cgc +0 -0
- package/dist/control/map.cgc +0 -0
- package/dist/control/monaco.cgc +0 -0
- package/dist/control/mpegts.cgc +0 -0
- package/dist/control/nav.cgc +0 -0
- package/dist/control/novnc.cgc +0 -0
- package/dist/control/page.cgc +0 -0
- package/dist/control/pdf.cgc +0 -0
- package/dist/control/property.cgc +0 -0
- package/dist/control/qrcode.cgc +0 -0
- package/dist/control/table.cgc +0 -0
- package/dist/control/task.cgc +0 -0
- package/dist/control/tplink.cgc +0 -0
- package/dist/control/tuieditor.cgc +0 -0
- package/dist/control/tuiviewer.cgc +0 -0
- package/dist/control/xterm.cgc +0 -0
- package/dist/index.js +59 -71
- package/dist/lib/control.js +213 -235
- package/dist/lib/core.js +356 -379
- package/dist/lib/dom.js +62 -91
- package/dist/lib/form.js +834 -906
- package/dist/lib/fs.js +834 -892
- package/dist/lib/native.js +32 -63
- package/dist/lib/storage.js +21 -33
- package/dist/lib/task.js +1054 -1098
- package/dist/lib/theme.js +102 -121
- package/dist/lib/tool.js +65 -98
- package/dist/lib/zip.js +27 -42
- package/dist/theme/blue.cgt +0 -0
- package/dist/theme/byterun.cgt +0 -0
- package/dist/theme/dark.cgt +0 -0
- package/dist/theme/light.cgt +0 -0
- package/package.json +1 -1
package/dist/lib/dom.js
CHANGED
|
@@ -32,15 +32,6 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
32
32
|
return result;
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
36
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
37
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
38
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
39
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
40
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
41
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
42
|
-
});
|
|
43
|
-
};
|
|
44
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
36
|
exports.is = exports.dpi = void 0;
|
|
46
37
|
exports.inPage = inPage;
|
|
@@ -154,7 +145,7 @@ function hasTouchButMouse(e) {
|
|
|
154
145
|
return true;
|
|
155
146
|
}
|
|
156
147
|
const now = Date.now();
|
|
157
|
-
if (now - lastTouchTime <
|
|
148
|
+
if (now - lastTouchTime < 60_000) {
|
|
158
149
|
return true;
|
|
159
150
|
}
|
|
160
151
|
return false;
|
|
@@ -163,8 +154,7 @@ function createToStyleList(taskId) {
|
|
|
163
154
|
styleList.insertAdjacentHTML('beforeend', `<div id="cg-style-task${taskId}"><div class="cg-style-control"></div><div class="cg-style-theme"></div><style class="cg-style-global"></style><div class="cg-style-form"></div></div>`);
|
|
164
155
|
}
|
|
165
156
|
function removeFromStyleList(taskId) {
|
|
166
|
-
|
|
167
|
-
(_a = document.getElementById('cg-style-task' + taskId.toString())) === null || _a === void 0 ? void 0 : _a.remove();
|
|
157
|
+
document.getElementById('cg-style-task' + taskId.toString())?.remove();
|
|
168
158
|
}
|
|
169
159
|
function pushStyle(taskId, style, type = 'global', formId = 0, panelId) {
|
|
170
160
|
const el = document.querySelector(`#cg-style-task${taskId} > .cg-style-${type}`);
|
|
@@ -713,7 +703,6 @@ function clearWatchProperty(formId, panelId) {
|
|
|
713
703
|
delete watchPropertyObjects[formId];
|
|
714
704
|
}
|
|
715
705
|
function getWatchInfo() {
|
|
716
|
-
var _a, _b;
|
|
717
706
|
const rtn = {
|
|
718
707
|
'formId': 0,
|
|
719
708
|
'default': {},
|
|
@@ -726,14 +715,13 @@ function getWatchInfo() {
|
|
|
726
715
|
rtn.formId = formId;
|
|
727
716
|
const panelIds = form.getActivePanel(formId);
|
|
728
717
|
const handler = (item, type, panelId) => {
|
|
729
|
-
var _a, _b, _c;
|
|
730
718
|
if (panelId) {
|
|
731
719
|
if (!rtn.panels[panelId]) {
|
|
732
720
|
rtn.panels[panelId] = {};
|
|
733
721
|
}
|
|
734
722
|
}
|
|
735
723
|
const ritem = panelId ? rtn.panels[panelId] : rtn.default;
|
|
736
|
-
const cname =
|
|
724
|
+
const cname = item.el.dataset.cgControl ?? findParentByData(item.el, 'cg-control')?.dataset.cgControl ?? 'unknown';
|
|
737
725
|
if (!ritem[cname]) {
|
|
738
726
|
ritem[cname] = {
|
|
739
727
|
'style': {
|
|
@@ -780,7 +768,7 @@ function getWatchInfo() {
|
|
|
780
768
|
}
|
|
781
769
|
}
|
|
782
770
|
for (const id of panelIds) {
|
|
783
|
-
if (
|
|
771
|
+
if (watchPropertyObjects[formId]?.[id]) {
|
|
784
772
|
for (const index in watchPropertyObjects[formId][id]) {
|
|
785
773
|
handler(watchPropertyObjects[formId][id][index], 'property', id.toString());
|
|
786
774
|
}
|
|
@@ -794,7 +782,7 @@ function getWatchInfo() {
|
|
|
794
782
|
}
|
|
795
783
|
}
|
|
796
784
|
for (const id of panelIds) {
|
|
797
|
-
if (
|
|
785
|
+
if (watchPositionObjects[formId]?.[id]) {
|
|
798
786
|
for (const index in watchPositionObjects[formId][id]) {
|
|
799
787
|
handler(watchPositionObjects[formId][id][index], 'position', id.toString());
|
|
800
788
|
}
|
|
@@ -972,7 +960,6 @@ function bindDblClick(e, handler) {
|
|
|
972
960
|
});
|
|
973
961
|
}
|
|
974
962
|
function bindDown(oe, opt) {
|
|
975
|
-
var _a;
|
|
976
963
|
if (hasTouchButMouse(oe)) {
|
|
977
964
|
return;
|
|
978
965
|
}
|
|
@@ -1048,7 +1035,6 @@ function bindDown(oe, opt) {
|
|
|
1048
1035
|
}
|
|
1049
1036
|
};
|
|
1050
1037
|
end = function (e) {
|
|
1051
|
-
var _a, _b;
|
|
1052
1038
|
if (e instanceof MouseEvent) {
|
|
1053
1039
|
window.removeEventListener('mousemove', move);
|
|
1054
1040
|
window.removeEventListener('mouseup', end);
|
|
@@ -1060,9 +1046,9 @@ function bindDown(oe, opt) {
|
|
|
1060
1046
|
oe.target.removeEventListener('touchcancel', end);
|
|
1061
1047
|
}
|
|
1062
1048
|
}
|
|
1063
|
-
|
|
1049
|
+
opt.up?.(e);
|
|
1064
1050
|
if (isStart) {
|
|
1065
|
-
|
|
1051
|
+
opt.end?.(e);
|
|
1066
1052
|
}
|
|
1067
1053
|
};
|
|
1068
1054
|
if (oe instanceof MouseEvent) {
|
|
@@ -1078,10 +1064,9 @@ function bindDown(oe, opt) {
|
|
|
1078
1064
|
oe.target.addEventListener('touchend', end);
|
|
1079
1065
|
oe.target.addEventListener('touchcancel', end);
|
|
1080
1066
|
}
|
|
1081
|
-
|
|
1067
|
+
opt.down?.(oe);
|
|
1082
1068
|
}
|
|
1083
1069
|
function bindScale(oe, handler) {
|
|
1084
|
-
var _a, _b, _c, _d;
|
|
1085
1070
|
const el = oe.currentTarget;
|
|
1086
1071
|
if (!el) {
|
|
1087
1072
|
return;
|
|
@@ -1094,8 +1079,8 @@ function bindScale(oe, handler) {
|
|
|
1094
1079
|
el.removeAttribute('data-cg-scale');
|
|
1095
1080
|
return;
|
|
1096
1081
|
}
|
|
1097
|
-
const ex = [oe.touches[0].clientX,
|
|
1098
|
-
const ey = [oe.touches[0].clientY,
|
|
1082
|
+
const ex = [oe.touches[0].clientX, oe.touches[1]?.clientX ?? -1000];
|
|
1083
|
+
const ey = [oe.touches[0].clientY, oe.touches[1]?.clientY ?? -1000];
|
|
1099
1084
|
let ndis = 0;
|
|
1100
1085
|
const epos = {
|
|
1101
1086
|
'x': ex[0],
|
|
@@ -1309,12 +1294,12 @@ function bindGesture(oe, before, handler) {
|
|
|
1309
1294
|
if (offset < 90) {
|
|
1310
1295
|
return;
|
|
1311
1296
|
}
|
|
1312
|
-
handler
|
|
1297
|
+
handler?.(dir);
|
|
1313
1298
|
}
|
|
1314
1299
|
});
|
|
1315
1300
|
}
|
|
1316
1301
|
else {
|
|
1317
|
-
(() =>
|
|
1302
|
+
(async () => {
|
|
1318
1303
|
const now = Date.now();
|
|
1319
1304
|
if (now - gestureWheel.last > 250) {
|
|
1320
1305
|
gestureWheel.offset = 0;
|
|
@@ -1392,7 +1377,7 @@ function bindGesture(oe, before, handler) {
|
|
|
1392
1377
|
}
|
|
1393
1378
|
}
|
|
1394
1379
|
gestureWheel.firstTimer = true;
|
|
1395
|
-
|
|
1380
|
+
await tool.sleep(30);
|
|
1396
1381
|
gestureWheel.firstTimer = false;
|
|
1397
1382
|
form.elements.gesture.classList.add('ani');
|
|
1398
1383
|
}
|
|
@@ -1447,11 +1432,11 @@ function bindGesture(oe, before, handler) {
|
|
|
1447
1432
|
return;
|
|
1448
1433
|
}
|
|
1449
1434
|
gestureWheel.done = true;
|
|
1450
|
-
handler
|
|
1451
|
-
|
|
1435
|
+
handler?.(gestureWheel.dir);
|
|
1436
|
+
await tool.sleep(500);
|
|
1452
1437
|
form.elements.gesture.style.opacity = '0';
|
|
1453
1438
|
form.elements.gesture.classList.remove('ani');
|
|
1454
|
-
})
|
|
1439
|
+
})().catch((e) => {
|
|
1455
1440
|
console.log('error', 'dom.bindGesture', e);
|
|
1456
1441
|
});
|
|
1457
1442
|
}
|
|
@@ -1523,7 +1508,6 @@ function bindDrag(e, opt) {
|
|
|
1523
1508
|
bindMove(e, {
|
|
1524
1509
|
'object': opt.el,
|
|
1525
1510
|
'start': function (x, y) {
|
|
1526
|
-
var _a;
|
|
1527
1511
|
const rect = opt.el.getBoundingClientRect();
|
|
1528
1512
|
form.showDrag();
|
|
1529
1513
|
form.moveDrag({
|
|
@@ -1535,10 +1519,9 @@ function bindDrag(e, opt) {
|
|
|
1535
1519
|
});
|
|
1536
1520
|
otop = rect.top;
|
|
1537
1521
|
oleft = rect.left;
|
|
1538
|
-
|
|
1522
|
+
opt.start?.(x, y);
|
|
1539
1523
|
},
|
|
1540
1524
|
'move': function (e, o) {
|
|
1541
|
-
var _a;
|
|
1542
1525
|
const ntop = otop + o.oy;
|
|
1543
1526
|
const nleft = oleft + o.ox;
|
|
1544
1527
|
form.moveDrag({
|
|
@@ -1589,10 +1572,9 @@ function bindDrag(e, opt) {
|
|
|
1589
1572
|
}
|
|
1590
1573
|
}));
|
|
1591
1574
|
nel = null;
|
|
1592
|
-
|
|
1575
|
+
opt.move?.(e, o);
|
|
1593
1576
|
},
|
|
1594
1577
|
'end': function (moveTimes, e) {
|
|
1595
|
-
var _a;
|
|
1596
1578
|
form.hideDrag();
|
|
1597
1579
|
if (nel === null) {
|
|
1598
1580
|
return;
|
|
@@ -1603,7 +1585,7 @@ function bindDrag(e, opt) {
|
|
|
1603
1585
|
'value': bindDragData
|
|
1604
1586
|
}
|
|
1605
1587
|
}));
|
|
1606
|
-
|
|
1588
|
+
opt.end?.(moveTimes, e);
|
|
1607
1589
|
bindDragData = undefined;
|
|
1608
1590
|
}
|
|
1609
1591
|
});
|
|
@@ -1651,7 +1633,6 @@ window.addEventListener('keyup', function (e) {
|
|
|
1651
1633
|
core.trigger('keyup', e);
|
|
1652
1634
|
});
|
|
1653
1635
|
function bindMove(e, opt) {
|
|
1654
|
-
var _a, _b, _c, _d, _e;
|
|
1655
1636
|
if (hasTouchButMouse(e)) {
|
|
1656
1637
|
return {
|
|
1657
1638
|
'left': 0,
|
|
@@ -1661,7 +1642,7 @@ function bindMove(e, opt) {
|
|
|
1661
1642
|
};
|
|
1662
1643
|
}
|
|
1663
1644
|
exports.is.move = true;
|
|
1664
|
-
setGlobalCursor(
|
|
1645
|
+
setGlobalCursor(opt.cursor ?? getComputedStyle(e.target).cursor);
|
|
1665
1646
|
let tx = e instanceof MouseEvent ? e.clientX : e.touches[0].clientX;
|
|
1666
1647
|
let ty = e instanceof MouseEvent ? e.clientY : e.touches[0].clientY;
|
|
1667
1648
|
let left, top, right, bottom;
|
|
@@ -1680,10 +1661,10 @@ function bindMove(e, opt) {
|
|
|
1680
1661
|
}
|
|
1681
1662
|
else {
|
|
1682
1663
|
const area = core.getAvailArea();
|
|
1683
|
-
left =
|
|
1684
|
-
top =
|
|
1685
|
-
right =
|
|
1686
|
-
bottom =
|
|
1664
|
+
left = opt.left ?? area.left;
|
|
1665
|
+
top = opt.top ?? area.top;
|
|
1666
|
+
right = opt.right ?? area.width;
|
|
1667
|
+
bottom = opt.bottom ?? area.height;
|
|
1687
1668
|
}
|
|
1688
1669
|
if (opt.offsetLeft) {
|
|
1689
1670
|
left += opt.offsetLeft;
|
|
@@ -1703,7 +1684,6 @@ function bindMove(e, opt) {
|
|
|
1703
1684
|
const moveTimes = [];
|
|
1704
1685
|
bindDown(e, {
|
|
1705
1686
|
start: () => {
|
|
1706
|
-
var _a, _b, _c, _d;
|
|
1707
1687
|
if (opt.start) {
|
|
1708
1688
|
if (opt.start(tx, ty) === false) {
|
|
1709
1689
|
setGlobalCursor();
|
|
@@ -1721,10 +1701,10 @@ function bindMove(e, opt) {
|
|
|
1721
1701
|
objectHeight = rect.height;
|
|
1722
1702
|
}
|
|
1723
1703
|
else {
|
|
1724
|
-
objectLeft =
|
|
1725
|
-
objectTop =
|
|
1726
|
-
objectWidth =
|
|
1727
|
-
objectHeight =
|
|
1704
|
+
objectLeft = opt.objectLeft ?? 0;
|
|
1705
|
+
objectTop = opt.objectTop ?? 0;
|
|
1706
|
+
objectWidth = opt.objectWidth ?? 0;
|
|
1707
|
+
objectHeight = opt.objectHeight ?? 0;
|
|
1728
1708
|
}
|
|
1729
1709
|
if (objectWidth > 0) {
|
|
1730
1710
|
offsetLeft = tx - objectLeft;
|
|
@@ -1736,7 +1716,6 @@ function bindMove(e, opt) {
|
|
|
1736
1716
|
offsetBottom = objectHeight - offsetTop;
|
|
1737
1717
|
},
|
|
1738
1718
|
move: (e, dir) => {
|
|
1739
|
-
var _a, _b, _c;
|
|
1740
1719
|
let x, y;
|
|
1741
1720
|
x = e instanceof MouseEvent ? e.clientX : e.touches[0].clientX;
|
|
1742
1721
|
y = e instanceof MouseEvent ? e.clientY : e.touches[0].clientY;
|
|
@@ -1872,13 +1851,13 @@ function bindMove(e, opt) {
|
|
|
1872
1851
|
}
|
|
1873
1852
|
if (!isBorder) {
|
|
1874
1853
|
isBorder = true;
|
|
1875
|
-
|
|
1854
|
+
opt.borderIn?.(x, y, border, e);
|
|
1876
1855
|
}
|
|
1877
1856
|
}
|
|
1878
1857
|
else {
|
|
1879
1858
|
if (isBorder) {
|
|
1880
1859
|
isBorder = false;
|
|
1881
|
-
|
|
1860
|
+
opt.borderOut?.();
|
|
1882
1861
|
}
|
|
1883
1862
|
}
|
|
1884
1863
|
const ox = x - tx;
|
|
@@ -1888,7 +1867,7 @@ function bindMove(e, opt) {
|
|
|
1888
1867
|
'ox': ox,
|
|
1889
1868
|
'oy': oy
|
|
1890
1869
|
});
|
|
1891
|
-
|
|
1870
|
+
opt.move?.(e, {
|
|
1892
1871
|
'ox': ox,
|
|
1893
1872
|
'oy': oy,
|
|
1894
1873
|
'x': x,
|
|
@@ -1906,14 +1885,12 @@ function bindMove(e, opt) {
|
|
|
1906
1885
|
ty = y;
|
|
1907
1886
|
},
|
|
1908
1887
|
up: (e) => {
|
|
1909
|
-
var _a;
|
|
1910
1888
|
exports.is.move = false;
|
|
1911
1889
|
setGlobalCursor();
|
|
1912
|
-
|
|
1890
|
+
opt.up?.(moveTimes, e);
|
|
1913
1891
|
},
|
|
1914
1892
|
end: (e) => {
|
|
1915
|
-
|
|
1916
|
-
(_a = opt.end) === null || _a === void 0 ? void 0 : _a.call(opt, moveTimes, e);
|
|
1893
|
+
opt.end?.(moveTimes, e);
|
|
1917
1894
|
}
|
|
1918
1895
|
});
|
|
1919
1896
|
if (opt.showRect) {
|
|
@@ -1935,12 +1912,11 @@ function bindMove(e, opt) {
|
|
|
1935
1912
|
};
|
|
1936
1913
|
}
|
|
1937
1914
|
function bindResize(e, opt) {
|
|
1938
|
-
var _a, _b;
|
|
1939
1915
|
if (hasTouchButMouse(e)) {
|
|
1940
1916
|
return;
|
|
1941
1917
|
}
|
|
1942
|
-
opt.minWidth =
|
|
1943
|
-
opt.minHeight =
|
|
1918
|
+
opt.minWidth = opt.minWidth ?? 0;
|
|
1919
|
+
opt.minHeight = opt.minHeight ?? 0;
|
|
1944
1920
|
const x = e instanceof MouseEvent ? e.clientX : e.touches[0].clientX;
|
|
1945
1921
|
const y = e instanceof MouseEvent ? e.clientY : e.touches[0].clientY;
|
|
1946
1922
|
let offsetLeft, offsetTop, offsetRight, offsetBottom;
|
|
@@ -2004,7 +1980,6 @@ function bindResize(e, opt) {
|
|
|
2004
1980
|
'offsetBottom': offsetBottom,
|
|
2005
1981
|
'start': opt.start,
|
|
2006
1982
|
'move': function (e, o) {
|
|
2007
|
-
var _a;
|
|
2008
1983
|
if (opt.border === 'tr' || opt.border === 'r' || opt.border === 'rb') {
|
|
2009
1984
|
opt.objectWidth += o.ox;
|
|
2010
1985
|
}
|
|
@@ -2019,7 +1994,7 @@ function bindResize(e, opt) {
|
|
|
2019
1994
|
opt.objectHeight -= o.oy;
|
|
2020
1995
|
opt.objectTop += o.oy;
|
|
2021
1996
|
}
|
|
2022
|
-
|
|
1997
|
+
opt.move?.(opt.objectLeft, opt.objectTop, opt.objectWidth, opt.objectHeight, x, y, o.border);
|
|
2023
1998
|
},
|
|
2024
1999
|
'end': opt.end
|
|
2025
2000
|
});
|
|
@@ -2117,37 +2092,33 @@ function siblingsData(el, name) {
|
|
|
2117
2092
|
}
|
|
2118
2093
|
return olist;
|
|
2119
2094
|
}
|
|
2120
|
-
function fullscreen() {
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
|
|
2126
|
-
|
|
2127
|
-
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
}
|
|
2134
|
-
});
|
|
2095
|
+
async function fullscreen() {
|
|
2096
|
+
const he = document.getElementsByTagName('html')[0];
|
|
2097
|
+
if (he.webkitRequestFullscreen) {
|
|
2098
|
+
await he.webkitRequestFullscreen();
|
|
2099
|
+
return true;
|
|
2100
|
+
}
|
|
2101
|
+
else if (he.requestFullscreen) {
|
|
2102
|
+
await he.requestFullscreen();
|
|
2103
|
+
return true;
|
|
2104
|
+
}
|
|
2105
|
+
else {
|
|
2106
|
+
return false;
|
|
2107
|
+
}
|
|
2135
2108
|
}
|
|
2136
|
-
function exitFullscreen() {
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
}
|
|
2150
|
-
});
|
|
2109
|
+
async function exitFullscreen() {
|
|
2110
|
+
const d = document;
|
|
2111
|
+
if (d.webkitExitFullscreen) {
|
|
2112
|
+
await d.webkitExitFullscreen();
|
|
2113
|
+
return true;
|
|
2114
|
+
}
|
|
2115
|
+
else if (d.exitFullscreen) {
|
|
2116
|
+
await d.exitFullscreen();
|
|
2117
|
+
return true;
|
|
2118
|
+
}
|
|
2119
|
+
else {
|
|
2120
|
+
return false;
|
|
2121
|
+
}
|
|
2151
2122
|
}
|
|
2152
2123
|
function createElement(tagName) {
|
|
2153
2124
|
return document.createElement(tagName);
|