master
zhaoqiang 2024-07-16 00:29:28 +08:00
parent 7a68b93079
commit f37c1ce336
1 changed files with 7 additions and 7 deletions

View File

@ -1136,7 +1136,7 @@ let handleAnimate = async (result: any) => {
let middleDuration = duration / num1
for (let i = 0; i < numTriangles; i++) {
let triangle = draw.polygon('0,-2 6,0 0,2').fill('lightgreen').stroke({ color: 'lightgreen', width: 0.2 })
let triangle = draw.polygon('0,-1 4,0 0,1').fill('lightgreen').stroke({ color: 'lightgreen', width: 0.2 })
let triangleanimate = document.createElementNS('http://www.w3.org/2000/svg', 'animateMotion')
triangleanimate.setAttribute('path', pointsValue)
@ -1263,7 +1263,7 @@ let handleAnimate = async (result: any) => {
let duration = numTriangles / num1
let middleDuration = duration / num1
for (let i = 0; i < numTriangles; i++) {
let triangle = draw.polygon('0,-2 -6,0 0,2').fill('lightgreen').stroke({ color: 'lightgreen', width: 0.2 })
let triangle = draw.polygon('0,-1 -4,0 0,1').fill('lightgreen').stroke({ color: 'lightgreen', width: 0.2 })
let triangleanimate = document.createElementNS('http://www.w3.org/2000/svg', 'animateMotion')
triangleanimate.setAttribute('path', pointsValue)
@ -1297,22 +1297,22 @@ let handleAnimate = async (result: any) => {
// 线
// 线
draw
.line(centerX, centerY, centerX + 20, centerY - 20)
.line(centerX, centerY, centerX + 10, centerY - 10)
.attr({
'stroke-width': 0.1,
id: 'load_' + data.load_id,
stroke: 'green',
'stroke-dasharray': '3,3'
'stroke-dasharray': '1,1'
})
.font({ size: '8' })
//
draw
.text(`P: ${(parseFloat(data['Pload/phase']) * 1000).toFixed(4)} kW\nQ: ${(parseFloat(data['i']) * 1000).toFixed(4)} kVar`)
.attr({
x: centerX + 20,
y: centerY - 20,
x: centerX + 10,
y: centerY - 10,
id: 'load_text' + data.load_id,
'font-size': '4',
'font-size': '2',
leading: '0.9'
})
.fill('green')