| | |
| | | if (existingRect) { |
| | | return { |
| | | ...existingRect, |
| | | xAxisa: (6000 - (rect.xAxis + rect.width)) * scaleFactor, |
| | | yAxisa: rect.yAxis * scaleFactory, |
| | | width: rect.edgWidth * scaleFactor, |
| | | height: rect.edgHeight * scaleFactory, |
| | | xAxisa: (6000 - (rect.xAxis + rect.width)) * scaleFactor * 1.1, |
| | | yAxisa: rect.yAxis * scaleFactory * 1.1, |
| | | width: rect.edgWidth * scaleFactor * 1.1, |
| | | height: rect.edgHeight * scaleFactory * 1.1, |
| | | widtha: rect.edgWidth, |
| | | heighta: rect.edgHeight, |
| | | state: rect.state, |
| | |
| | | // 如果不存在,则添加新矩形,默认 isActive 为 false |
| | | return { |
| | | ...rect, |
| | | xAxisa: (6000 - (rect.xAxis + rect.width)) * scaleFactor, |
| | | yAxisa: rect.yAxis * scaleFactory, |
| | | width: rect.edgWidth * scaleFactor, |
| | | height: rect.edgHeight * scaleFactory, |
| | | xAxisa: (6000 - (rect.xAxis + rect.width)) * scaleFactor * 1.1, |
| | | yAxisa: rect.yAxis * scaleFactory * 1.1, |
| | | width: rect.edgWidth * scaleFactor * 1.1, |
| | | height: rect.edgHeight * scaleFactory * 1.1, |
| | | widtha: rect.edgWidth, |
| | | heighta: rect.edgHeight, |
| | | state: rect.state, |
| | |
| | | justify-content: center; |
| | | align-items: center; |
| | | height: 100%; /* 确保div占据整个矩形的高度 */ |
| | | font-size: small; |
| | | font-size: large; |
| | | } |
| | | #line { |
| | | position: absolute; |
| | |
| | | if (existingRect) { |
| | | return { |
| | | ...existingRect, |
| | | xAxisa: (6000 - (rect.xAxis + rect.width)) * scaleFactor, |
| | | yAxisa: rect.yAxis * scaleFactory, |
| | | width: rect.edgWidth * scaleFactor, |
| | | height: rect.edgHeight * scaleFactory, |
| | | xAxisa: (6000 - (rect.xAxis + rect.width)) * scaleFactor * 1.1, |
| | | yAxisa: rect.yAxis * scaleFactory * 1.1, |
| | | width: rect.edgWidth * scaleFactor * 1.1, |
| | | height: rect.edgHeight * scaleFactory * 1.1, |
| | | widtha: rect.edgWidth, |
| | | heighta: rect.edgHeight, |
| | | state: rect.state, |
| | |
| | | // 如果不存在,则添加新矩形,默认 isActive 为 false |
| | | return { |
| | | ...rect, |
| | | xAxisa: (6000 - (rect.xAxis + rect.width)) * scaleFactor, |
| | | yAxisa: rect.yAxis * scaleFactory, |
| | | width: rect.edgWidth * scaleFactor, |
| | | height: rect.edgHeight * scaleFactory, |
| | | xAxisa: (6000 - (rect.xAxis + rect.width)) * scaleFactor * 1.1, |
| | | yAxisa: rect.yAxis * scaleFactory * 1.1, |
| | | width: rect.edgWidth * scaleFactor * 1.1, |
| | | height: rect.edgHeight * scaleFactory * 1.1, |
| | | widtha: rect.edgWidth, |
| | | heighta: rect.edgHeight, |
| | | state: rect.state, |
| | |
| | | justify-content: center; |
| | | align-items: center; |
| | | height: 100%; /* 确保div占据整个矩形的高度 */ |
| | | font-size: small; |
| | | font-size: large; |
| | | } |
| | | #line { |
| | | position: absolute; |
| | |
| | | justify-content: center; |
| | | align-items: center; |
| | | height: 100%; |
| | | font-size: small; |
| | | font-size: large; |
| | | } |
| | | #rect { |
| | | position: relative; /* 确保箭头可以相对于矩形定位 */ |