Commit 576c5120e28b7f7ee08af54a112b53327c0bcec8
Merge branch 'perf/water-flow-component' into 'main_dev'
perf: 优化流速效果 See merge request yunteng/thingskit-scada!228
Showing
1 changed file
with
2 additions
and
2 deletions
... | ... | @@ -132,14 +132,14 @@ export class DataDynamicEffectHandler { |
132 | 132 | const { attr, enable } = data as DynamicActDataType |
133 | 133 | if (!enable) return |
134 | 134 | const { latestValue } = useLatestMessageValue(message.data, attr!) |
135 | - const { flag, record } = getMeetTheConditionsRange((data as DynamicActDataType).rangeList, latestValue) | |
135 | + const { flag, record } = getMeetTheConditionsRange((data as DynamicActDataType).rangeList, Number(latestValue)) | |
136 | 136 | const nodeEl = this.nodeUtils.getNodeForCell<SVGAElement>(cell) |
137 | 137 | if (flag) { |
138 | 138 | const { type } = record! |
139 | 139 | if (type === ActRangListItemTypeEnum.RUN) { |
140 | 140 | const element = (nodeEl?.querySelectorAll('path')?.[1] as SVGPathElement) |
141 | 141 | element.classList.add(ActAnimationName.FLOW) |
142 | - element.style.animationDuration = `${record?.flowSpeed || 1}s` | |
142 | + element.style.animationDuration = `${(record?.flowSpeed || 10) * 0.1}s` | |
143 | 143 | } |
144 | 144 | else { (nodeEl?.querySelectorAll('path')?.[1] as SVGPathElement).classList.remove(ActAnimationName.FLOW) } |
145 | 145 | } | ... | ... |