@antv/g-lite 1.0.64 → 1.0.66
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/dist/index.esm.js +16 -24
- package/dist/index.js +16 -24
- package/dist/index.umd.js +16 -24
- package/dist/index.umd.min.js +1 -1
- package/dist/services/RenderingService.d.ts.map +1 -1
- package/dist/utils/dom.d.ts +1 -0
- package/dist/utils/dom.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/index.esm.js
CHANGED
|
@@ -1641,6 +1641,19 @@ function cleanExistedCanvas(container, canvas) {
|
|
|
1641
1641
|
}
|
|
1642
1642
|
var isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
|
1643
1643
|
|
|
1644
|
+
function sortedIndex(array, value) {
|
|
1645
|
+
var low = 0;
|
|
1646
|
+
var high = array.length;
|
|
1647
|
+
while (low < high) {
|
|
1648
|
+
var mid = low + high >>> 1;
|
|
1649
|
+
if (sortByZIndex(array[mid], value) < 0) {
|
|
1650
|
+
low = mid + 1;
|
|
1651
|
+
} else {
|
|
1652
|
+
high = mid;
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1655
|
+
return low;
|
|
1656
|
+
}
|
|
1644
1657
|
function sortByZIndex(o1, o2) {
|
|
1645
1658
|
var zIndex1 = Number(o1.parsedStyle.zIndex);
|
|
1646
1659
|
var zIndex2 = Number(o2.parsedStyle.zIndex);
|
|
@@ -12486,32 +12499,11 @@ var RenderingService = /*#__PURE__*/function () {
|
|
|
12486
12499
|
var _index = sortable.sorted.indexOf(child);
|
|
12487
12500
|
sortable.sorted.splice(_index, 1);
|
|
12488
12501
|
} else {
|
|
12489
|
-
|
|
12490
|
-
var firstZIndex = Number(sortable.sorted[0].parsedStyle.zIndex);
|
|
12491
|
-
var lastZIndex = Number(sortable.sorted[sortable.sorted.length - 1].parsedStyle.zIndex);
|
|
12492
|
-
if (zIndex < firstZIndex) {
|
|
12493
|
-
sortable.sorted.unshift(child);
|
|
12494
|
-
} else if (zIndex > lastZIndex) {
|
|
12502
|
+
if (sortable.sorted.length === 0) {
|
|
12495
12503
|
sortable.sorted.push(child);
|
|
12496
12504
|
} else {
|
|
12497
|
-
|
|
12498
|
-
|
|
12499
|
-
var _sortable$sorted, _sortable$sorted$i;
|
|
12500
|
-
var prevZIndex = Number((_sortable$sorted = sortable.sorted[i - 1]) === null || _sortable$sorted === void 0 ? void 0 : _sortable$sorted.parsedStyle.zIndex) || -Infinity;
|
|
12501
|
-
var currentZIndex = Number((_sortable$sorted$i = sortable.sorted[i]) === null || _sortable$sorted$i === void 0 ? void 0 : _sortable$sorted$i.parsedStyle.zIndex);
|
|
12502
|
-
if (zIndex > prevZIndex && zIndex < currentZIndex) {
|
|
12503
|
-
sortable.sorted.splice(i, 0, child);
|
|
12504
|
-
break;
|
|
12505
|
-
}
|
|
12506
|
-
if (zIndex === currentZIndex) {
|
|
12507
|
-
var currentIndex = displayObject.childNodes.indexOf(sortable.sorted[i]);
|
|
12508
|
-
var nextIndex = displayObject.childNodes.indexOf(sortable.sorted[i + 1]) || Infinity;
|
|
12509
|
-
if (index > currentIndex && index < nextIndex) {
|
|
12510
|
-
sortable.sorted.splice(i + 1, 0, child);
|
|
12511
|
-
break;
|
|
12512
|
-
}
|
|
12513
|
-
}
|
|
12514
|
-
}
|
|
12505
|
+
var _index2 = sortedIndex(sortable.sorted, child);
|
|
12506
|
+
sortable.sorted.splice(_index2, 0, child);
|
|
12515
12507
|
}
|
|
12516
12508
|
}
|
|
12517
12509
|
});
|
package/dist/index.js
CHANGED
|
@@ -1645,6 +1645,19 @@ function cleanExistedCanvas(container, canvas) {
|
|
|
1645
1645
|
}
|
|
1646
1646
|
var isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
|
1647
1647
|
|
|
1648
|
+
function sortedIndex(array, value) {
|
|
1649
|
+
var low = 0;
|
|
1650
|
+
var high = array.length;
|
|
1651
|
+
while (low < high) {
|
|
1652
|
+
var mid = low + high >>> 1;
|
|
1653
|
+
if (sortByZIndex(array[mid], value) < 0) {
|
|
1654
|
+
low = mid + 1;
|
|
1655
|
+
} else {
|
|
1656
|
+
high = mid;
|
|
1657
|
+
}
|
|
1658
|
+
}
|
|
1659
|
+
return low;
|
|
1660
|
+
}
|
|
1648
1661
|
function sortByZIndex(o1, o2) {
|
|
1649
1662
|
var zIndex1 = Number(o1.parsedStyle.zIndex);
|
|
1650
1663
|
var zIndex2 = Number(o2.parsedStyle.zIndex);
|
|
@@ -12478,32 +12491,11 @@ var RenderingService = /*#__PURE__*/function () {
|
|
|
12478
12491
|
var _index = sortable.sorted.indexOf(child);
|
|
12479
12492
|
sortable.sorted.splice(_index, 1);
|
|
12480
12493
|
} else {
|
|
12481
|
-
|
|
12482
|
-
var firstZIndex = Number(sortable.sorted[0].parsedStyle.zIndex);
|
|
12483
|
-
var lastZIndex = Number(sortable.sorted[sortable.sorted.length - 1].parsedStyle.zIndex);
|
|
12484
|
-
if (zIndex < firstZIndex) {
|
|
12485
|
-
sortable.sorted.unshift(child);
|
|
12486
|
-
} else if (zIndex > lastZIndex) {
|
|
12494
|
+
if (sortable.sorted.length === 0) {
|
|
12487
12495
|
sortable.sorted.push(child);
|
|
12488
12496
|
} else {
|
|
12489
|
-
|
|
12490
|
-
|
|
12491
|
-
var _sortable$sorted, _sortable$sorted$i;
|
|
12492
|
-
var prevZIndex = Number((_sortable$sorted = sortable.sorted[i - 1]) === null || _sortable$sorted === void 0 ? void 0 : _sortable$sorted.parsedStyle.zIndex) || -Infinity;
|
|
12493
|
-
var currentZIndex = Number((_sortable$sorted$i = sortable.sorted[i]) === null || _sortable$sorted$i === void 0 ? void 0 : _sortable$sorted$i.parsedStyle.zIndex);
|
|
12494
|
-
if (zIndex > prevZIndex && zIndex < currentZIndex) {
|
|
12495
|
-
sortable.sorted.splice(i, 0, child);
|
|
12496
|
-
break;
|
|
12497
|
-
}
|
|
12498
|
-
if (zIndex === currentZIndex) {
|
|
12499
|
-
var currentIndex = displayObject.childNodes.indexOf(sortable.sorted[i]);
|
|
12500
|
-
var nextIndex = displayObject.childNodes.indexOf(sortable.sorted[i + 1]) || Infinity;
|
|
12501
|
-
if (index > currentIndex && index < nextIndex) {
|
|
12502
|
-
sortable.sorted.splice(i + 1, 0, child);
|
|
12503
|
-
break;
|
|
12504
|
-
}
|
|
12505
|
-
}
|
|
12506
|
-
}
|
|
12497
|
+
var _index2 = sortedIndex(sortable.sorted, child);
|
|
12498
|
+
sortable.sorted.splice(_index2, 0, child);
|
|
12507
12499
|
}
|
|
12508
12500
|
}
|
|
12509
12501
|
});
|
package/dist/index.umd.js
CHANGED
|
@@ -7390,6 +7390,19 @@
|
|
|
7390
7390
|
}
|
|
7391
7391
|
var isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
|
7392
7392
|
|
|
7393
|
+
function sortedIndex(array, value) {
|
|
7394
|
+
var low = 0;
|
|
7395
|
+
var high = array.length;
|
|
7396
|
+
while (low < high) {
|
|
7397
|
+
var mid = low + high >>> 1;
|
|
7398
|
+
if (sortByZIndex(array[mid], value) < 0) {
|
|
7399
|
+
low = mid + 1;
|
|
7400
|
+
} else {
|
|
7401
|
+
high = mid;
|
|
7402
|
+
}
|
|
7403
|
+
}
|
|
7404
|
+
return low;
|
|
7405
|
+
}
|
|
7393
7406
|
function sortByZIndex(o1, o2) {
|
|
7394
7407
|
var zIndex1 = Number(o1.parsedStyle.zIndex);
|
|
7395
7408
|
var zIndex2 = Number(o2.parsedStyle.zIndex);
|
|
@@ -19452,32 +19465,11 @@
|
|
|
19452
19465
|
var _index = sortable.sorted.indexOf(child);
|
|
19453
19466
|
sortable.sorted.splice(_index, 1);
|
|
19454
19467
|
} else {
|
|
19455
|
-
|
|
19456
|
-
var firstZIndex = Number(sortable.sorted[0].parsedStyle.zIndex);
|
|
19457
|
-
var lastZIndex = Number(sortable.sorted[sortable.sorted.length - 1].parsedStyle.zIndex);
|
|
19458
|
-
if (zIndex < firstZIndex) {
|
|
19459
|
-
sortable.sorted.unshift(child);
|
|
19460
|
-
} else if (zIndex > lastZIndex) {
|
|
19468
|
+
if (sortable.sorted.length === 0) {
|
|
19461
19469
|
sortable.sorted.push(child);
|
|
19462
19470
|
} else {
|
|
19463
|
-
|
|
19464
|
-
|
|
19465
|
-
var _sortable$sorted, _sortable$sorted$i;
|
|
19466
|
-
var prevZIndex = Number((_sortable$sorted = sortable.sorted[i - 1]) === null || _sortable$sorted === void 0 ? void 0 : _sortable$sorted.parsedStyle.zIndex) || -Infinity;
|
|
19467
|
-
var currentZIndex = Number((_sortable$sorted$i = sortable.sorted[i]) === null || _sortable$sorted$i === void 0 ? void 0 : _sortable$sorted$i.parsedStyle.zIndex);
|
|
19468
|
-
if (zIndex > prevZIndex && zIndex < currentZIndex) {
|
|
19469
|
-
sortable.sorted.splice(i, 0, child);
|
|
19470
|
-
break;
|
|
19471
|
-
}
|
|
19472
|
-
if (zIndex === currentZIndex) {
|
|
19473
|
-
var currentIndex = displayObject.childNodes.indexOf(sortable.sorted[i]);
|
|
19474
|
-
var nextIndex = displayObject.childNodes.indexOf(sortable.sorted[i + 1]) || Infinity;
|
|
19475
|
-
if (index > currentIndex && index < nextIndex) {
|
|
19476
|
-
sortable.sorted.splice(i + 1, 0, child);
|
|
19477
|
-
break;
|
|
19478
|
-
}
|
|
19479
|
-
}
|
|
19480
|
-
}
|
|
19471
|
+
var _index2 = sortedIndex(sortable.sorted, child);
|
|
19472
|
+
sortable.sorted.splice(_index2, 0, child);
|
|
19481
19473
|
}
|
|
19482
19474
|
}
|
|
19483
19475
|
});
|