| | |
| | | class="rect" |
| | | @click="showDialog(rect.glassId)" |
| | | :style="{ position: 'absolute', |
| | | top: `${rect.yAxis}px`, left: `${rect.xAxis}px`, width: `${rect.edgWidth}px`, height: `${rect.edgHeight}px`, |
| | | top: `${rect.yAxisa}px`, left: `${rect.xAxisa}px`, width: `${rect.width}px`, height: `${rect.height}px`, |
| | | backgroundColor: rect.isActive ? '#ADFF2F' : getRectColor(rect.state) |
| | | }"> |
| | | <div class="centered-text"> |
| | |
| | | if (existingRect) { |
| | | return { |
| | | ...existingRect, |
| | | xAxis: (6000 - (rect.xAxis + rect.edgWidth)) * scaleFactor, |
| | | yAxis: rect.yAxis * scaleFactory, |
| | | edgWidth: rect.edgWidth * scaleFactor, |
| | | edgHeight: rect.edgHeight * scaleFactory, |
| | | xAxisa: (6000 - (rect.xAxis + rect.width)) * scaleFactor, |
| | | yAxisa: rect.yAxis * scaleFactory, |
| | | width: rect.edgWidth * scaleFactor, |
| | | height: rect.edgHeight * scaleFactory, |
| | | widtha: rect.edgWidth, |
| | | heighta: rect.edgHeight, |
| | | state: rect.state, |
| | |
| | | // 如果不存在,则添加新矩形,默认 isActive 为 false |
| | | return { |
| | | ...rect, |
| | | xAxis: (6000 - (rect.xAxis + rect.edgWidth)) * scaleFactor, |
| | | yAxis: rect.yAxis * scaleFactory, |
| | | edgWidth: rect.edgWidth * scaleFactor, |
| | | edgHeight: rect.edgHeight * scaleFactory, |
| | | xAxisa: (6000 - (rect.xAxis + rect.width)) * scaleFactor, |
| | | yAxisa: rect.yAxis * scaleFactory, |
| | | width: rect.edgWidth * scaleFactor, |
| | | height: rect.edgHeight * scaleFactory, |
| | | widtha: rect.edgWidth, |
| | | heighta: rect.edgHeight, |
| | | state: rect.state, |