openatc-components 0.1.62 → 0.1.63
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.
|
@@ -774,13 +774,13 @@ export default {
|
|
|
774
774
|
}
|
|
775
775
|
obj.split = split
|
|
776
776
|
if (ring.sum) {
|
|
777
|
-
obj.redWidth = ((currPhase.redclear + ring.sum) /
|
|
777
|
+
obj.redWidth = ((currPhase.redclear + ring.sum) / cycle * 100).toFixed(3) + '%'
|
|
778
778
|
} else {
|
|
779
|
-
obj.redWidth = (currPhase.redclear /
|
|
779
|
+
obj.redWidth = (currPhase.redclear / cycle * 100).toFixed(3) + '%'
|
|
780
780
|
}
|
|
781
|
-
obj.flashgreen = (currPhase.flashgreen /
|
|
782
|
-
obj.yellowWidth = (currPhase.yellow /
|
|
783
|
-
obj.greenWidth = ((split - currPhase.redclear - currPhase.yellow - currPhase.flashgreen) /
|
|
781
|
+
obj.flashgreen = (currPhase.flashgreen / cycle * 100).toFixed(3) + '%'
|
|
782
|
+
obj.yellowWidth = (currPhase.yellow / cycle * 100).toFixed(3) + '%'
|
|
783
|
+
obj.greenWidth = ((split - currPhase.redclear - currPhase.yellow - currPhase.flashgreen) / cycle * 100).toFixed(3) + '%'
|
|
784
784
|
// 忽略相位不显示
|
|
785
785
|
// let mode = ring.mode
|
|
786
786
|
// if (mode !== 7) { // 忽略相位不显示
|
|
@@ -1111,8 +1111,8 @@ export default {
|
|
|
1111
1111
|
newMin.push(minNum)
|
|
1112
1112
|
let newmaxNum = Math.max.apply(Math, newMax)// 每组最大值
|
|
1113
1113
|
let newminNum = Math.min.apply(Math, newMin)
|
|
1114
|
+
this.newCycle = newmaxNum + newminNum
|
|
1114
1115
|
if (newmaxNum === newminNum) {
|
|
1115
|
-
this.newCycle = newmaxNum + newminNum
|
|
1116
1116
|
this.max = newmaxNum + newminNum
|
|
1117
1117
|
pattern.map(d => {
|
|
1118
1118
|
d.map(r => {
|