@zhongguo168a/yxeditor-common 0.0.79 → 0.0.80
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.d.ts +11 -2
- package/dist/index.esm.js +26 -0
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1804,7 +1804,7 @@ declare namespace formatutil {
|
|
|
1804
1804
|
function format数字使用逗号(val: number | string, N?: number): string;
|
|
1805
1805
|
}
|
|
1806
1806
|
|
|
1807
|
-
declare enum GeometryDirection {
|
|
1807
|
+
declare const enum GeometryDirection {
|
|
1808
1808
|
East = 0,
|
|
1809
1809
|
SouthEast = 1,
|
|
1810
1810
|
South = 2,
|
|
@@ -1812,9 +1812,18 @@ declare enum GeometryDirection {
|
|
|
1812
1812
|
West = 4,
|
|
1813
1813
|
NorthWest = 5,
|
|
1814
1814
|
North = 6,
|
|
1815
|
-
NorthEast = 7
|
|
1815
|
+
NorthEast = 7,
|
|
1816
|
+
Any = -1
|
|
1817
|
+
}
|
|
1818
|
+
declare const enum DirectionMode {
|
|
1819
|
+
任意 = 0,
|
|
1820
|
+
二方向 = 1,
|
|
1821
|
+
四方向 = 2,
|
|
1822
|
+
斜四方向 = 3,
|
|
1823
|
+
八方向 = 4
|
|
1816
1824
|
}
|
|
1817
1825
|
declare class GeometryUtil {
|
|
1826
|
+
getDirection(mode: DirectionMode, 角度: number): GeometryDirection;
|
|
1818
1827
|
/**
|
|
1819
1828
|
* mode,8表示八方向,2表示二方向(左右),4表示4方向
|
|
1820
1829
|
* @param dot
|
package/dist/index.esm.js
CHANGED
|
@@ -5477,8 +5477,34 @@ var GeometryDirection;
|
|
|
5477
5477
|
GeometryDirection[GeometryDirection["NorthWest"] = 5] = "NorthWest";
|
|
5478
5478
|
GeometryDirection[GeometryDirection["North"] = 6] = "North";
|
|
5479
5479
|
GeometryDirection[GeometryDirection["NorthEast"] = 7] = "NorthEast";
|
|
5480
|
+
GeometryDirection[GeometryDirection["Any"] = -1] = "Any";
|
|
5480
5481
|
})(GeometryDirection || (GeometryDirection = {}));
|
|
5482
|
+
var DirectionMode;
|
|
5483
|
+
(function (DirectionMode) {
|
|
5484
|
+
DirectionMode[DirectionMode["\u4EFB\u610F"] = 0] = "\u4EFB\u610F";
|
|
5485
|
+
DirectionMode[DirectionMode["\u4E8C\u65B9\u5411"] = 1] = "\u4E8C\u65B9\u5411";
|
|
5486
|
+
DirectionMode[DirectionMode["\u56DB\u65B9\u5411"] = 2] = "\u56DB\u65B9\u5411";
|
|
5487
|
+
DirectionMode[DirectionMode["\u659C\u56DB\u65B9\u5411"] = 3] = "\u659C\u56DB\u65B9\u5411";
|
|
5488
|
+
DirectionMode[DirectionMode["\u516B\u65B9\u5411"] = 4] = "\u516B\u65B9\u5411";
|
|
5489
|
+
})(DirectionMode || (DirectionMode = {}));
|
|
5481
5490
|
class GeometryUtil {
|
|
5491
|
+
getDirection(mode, 角度) {
|
|
5492
|
+
let direction = 0;
|
|
5493
|
+
switch (mode) {
|
|
5494
|
+
case DirectionMode.任意:
|
|
5495
|
+
direction = GeometryDirection.Any;
|
|
5496
|
+
break;
|
|
5497
|
+
case DirectionMode.二方向:
|
|
5498
|
+
direction = geoutil.angleToDirection(角度, 2);
|
|
5499
|
+
break;
|
|
5500
|
+
case DirectionMode.四方向:
|
|
5501
|
+
direction = geoutil.angleToDirection(角度, 4);
|
|
5502
|
+
break;
|
|
5503
|
+
case DirectionMode.斜四方向:
|
|
5504
|
+
break;
|
|
5505
|
+
}
|
|
5506
|
+
return direction;
|
|
5507
|
+
}
|
|
5482
5508
|
/**
|
|
5483
5509
|
* mode,8表示八方向,2表示二方向(左右),4表示4方向
|
|
5484
5510
|
* @param dot
|