Commit 5421b5bda22a8bac7ef15b3e251379692b475680

Authored by ww
1 parent 446d5876

perf: 优化流速效果

@@ -132,14 +132,14 @@ export class DataDynamicEffectHandler { @@ -132,14 +132,14 @@ export class DataDynamicEffectHandler {
132 const { attr, enable } = data as DynamicActDataType 132 const { attr, enable } = data as DynamicActDataType
133 if (!enable) return 133 if (!enable) return
134 const { latestValue } = useLatestMessageValue(message.data, attr!) 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 const nodeEl = this.nodeUtils.getNodeForCell<SVGAElement>(cell) 136 const nodeEl = this.nodeUtils.getNodeForCell<SVGAElement>(cell)
137 if (flag) { 137 if (flag) {
138 const { type } = record! 138 const { type } = record!
139 if (type === ActRangListItemTypeEnum.RUN) { 139 if (type === ActRangListItemTypeEnum.RUN) {
140 const element = (nodeEl?.querySelectorAll('path')?.[1] as SVGPathElement) 140 const element = (nodeEl?.querySelectorAll('path')?.[1] as SVGPathElement)
141 element.classList.add(ActAnimationName.FLOW) 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 else { (nodeEl?.querySelectorAll('path')?.[1] as SVGPathElement).classList.remove(ActAnimationName.FLOW) } 144 else { (nodeEl?.querySelectorAll('path')?.[1] as SVGPathElement).classList.remove(ActAnimationName.FLOW) }
145 } 145 }