update
parent
7a68b93079
commit
f37c1ce336
|
@ -1136,7 +1136,7 @@ let handleAnimate = async (result: any) => {
|
||||||
let middleDuration = duration / num1
|
let middleDuration = duration / num1
|
||||||
|
|
||||||
for (let i = 0; i < numTriangles; i++) {
|
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')
|
let triangleanimate = document.createElementNS('http://www.w3.org/2000/svg', 'animateMotion')
|
||||||
triangleanimate.setAttribute('path', pointsValue)
|
triangleanimate.setAttribute('path', pointsValue)
|
||||||
|
@ -1263,7 +1263,7 @@ let handleAnimate = async (result: any) => {
|
||||||
let duration = numTriangles / num1
|
let duration = numTriangles / num1
|
||||||
let middleDuration = duration / num1
|
let middleDuration = duration / num1
|
||||||
for (let i = 0; i < numTriangles; i++) {
|
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')
|
let triangleanimate = document.createElementNS('http://www.w3.org/2000/svg', 'animateMotion')
|
||||||
triangleanimate.setAttribute('path', pointsValue)
|
triangleanimate.setAttribute('path', pointsValue)
|
||||||
|
@ -1297,22 +1297,22 @@ let handleAnimate = async (result: any) => {
|
||||||
// 这是变压器上的文字和线段
|
// 这是变压器上的文字和线段
|
||||||
// 引出线
|
// 引出线
|
||||||
draw
|
draw
|
||||||
.line(centerX, centerY, centerX + 20, centerY - 20)
|
.line(centerX, centerY, centerX + 10, centerY - 10)
|
||||||
.attr({
|
.attr({
|
||||||
'stroke-width': 0.1,
|
'stroke-width': 0.1,
|
||||||
id: 'load_' + data.load_id,
|
id: 'load_' + data.load_id,
|
||||||
stroke: 'green',
|
stroke: 'green',
|
||||||
'stroke-dasharray': '3,3'
|
'stroke-dasharray': '1,1'
|
||||||
})
|
})
|
||||||
.font({ size: '8' })
|
.font({ size: '8' })
|
||||||
// 文本
|
// 文本
|
||||||
draw
|
draw
|
||||||
.text(`P: ${(parseFloat(data['Pload/phase']) * 1000).toFixed(4)} kW\nQ: ${(parseFloat(data['i']) * 1000).toFixed(4)} kVar`)
|
.text(`P: ${(parseFloat(data['Pload/phase']) * 1000).toFixed(4)} kW\nQ: ${(parseFloat(data['i']) * 1000).toFixed(4)} kVar`)
|
||||||
.attr({
|
.attr({
|
||||||
x: centerX + 20,
|
x: centerX + 10,
|
||||||
y: centerY - 20,
|
y: centerY - 10,
|
||||||
id: 'load_text' + data.load_id,
|
id: 'load_text' + data.load_id,
|
||||||
'font-size': '4',
|
'font-size': '2',
|
||||||
leading: '0.9'
|
leading: '0.9'
|
||||||
})
|
})
|
||||||
.fill('green')
|
.fill('green')
|
||||||
|
|
Loading…
Reference in New Issue