atr-components 0.2.302 → 0.2.303
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/core/utils/ToolsUtil.d.ts +7 -0
- package/esm2020/core/utils/ToolsUtil.mjs +9 -7
- package/esm2020/lib/shared/form/form.component.mjs +4 -1
- package/fesm2015/atr-components.mjs +11 -6
- package/fesm2015/atr-components.mjs.map +1 -1
- package/fesm2020/atr-components.mjs +11 -6
- package/fesm2020/atr-components.mjs.map +1 -1
- package/lib/shared/form/form.component.d.ts +1 -1
- package/package.json +1 -1
|
@@ -641,6 +641,11 @@ class ToolsUtil {
|
|
|
641
641
|
static modaleStyle() {
|
|
642
642
|
return { 'maxHeight': ToolsUtil.windowHeight() - 200 + 'px', 'overflow-y': 'auto' };
|
|
643
643
|
}
|
|
644
|
+
static getLength(pointA, pointB) {
|
|
645
|
+
var lengthAB = Math.sqrt(Math.pow(pointA.x1 - pointB.x1, 2) +
|
|
646
|
+
Math.pow(pointA.y1 - pointB.y1, 2));
|
|
647
|
+
return lengthAB;
|
|
648
|
+
}
|
|
644
649
|
static getRotateNum(pointB, pointC, pointA) {
|
|
645
650
|
//ABC中心点,起始点,终点
|
|
646
651
|
let AB = {};
|
|
@@ -650,12 +655,9 @@ class ToolsUtil {
|
|
|
650
655
|
AC.x1 = pointC.x1 - pointA.x1;
|
|
651
656
|
AC.y1 = pointC.y1 - pointA.y1;
|
|
652
657
|
var direct = AB.x1 * AC.y1 - AB.y1 * AC.y1;
|
|
653
|
-
var lengthAB =
|
|
654
|
-
|
|
655
|
-
var
|
|
656
|
-
Math.pow(pointA.y1 - pointC.y1, 2));
|
|
657
|
-
var lengthBC = Math.sqrt(Math.pow(pointB.x1 - pointC.x1, 2) +
|
|
658
|
-
Math.pow(pointB.y1 - pointC.y1, 2));
|
|
658
|
+
var lengthAB = this.getLength(pointB, pointA);
|
|
659
|
+
var lengthAC = this.getLength(pointC, pointA);
|
|
660
|
+
var lengthBC = this.getLength(pointB, pointC);
|
|
659
661
|
var cosA = (Math.pow(lengthAB, 2) + Math.pow(lengthAC, 2) -
|
|
660
662
|
Math.pow(lengthBC, 2)) / (2 * lengthAB * lengthAC);
|
|
661
663
|
var angleA = Math.round(Math.acos(cosA) * 180 / Math.PI);
|
|
@@ -4724,6 +4726,9 @@ class AtrFormComponent {
|
|
|
4724
4726
|
return obj;
|
|
4725
4727
|
}
|
|
4726
4728
|
showTime(item) {
|
|
4729
|
+
if (item.nzShowTime) {
|
|
4730
|
+
return item.nzShowTime;
|
|
4731
|
+
}
|
|
4727
4732
|
if (!item.dateFormat || item.dateFormat == "yyyy-MM-dd") {
|
|
4728
4733
|
return false;
|
|
4729
4734
|
}
|