Browse Source

小优化

任一存 1 year ago
parent
commit
5ad1d0cbdb
3 changed files with 14 additions and 5 deletions
  1. 4 2
      README.md
  2. 4 3
      src/App.vue
  3. 6 0
      src/components/PointEditor.vue

+ 4 - 2
README.md

@@ -61,8 +61,10 @@ history最大条数
 
 复原功能 check
 
-选中这个点,可以修改他的weight和z值 check
+双击选中这个点,可以修改他的weight和z值 check
 
-hover后显示周围点的位置和坐标
+编辑框搞宽点 check
+
+单击点位高亮周围的点,并展示id,并填充补点的高度。
 
 y轴反转

+ 4 - 3
src/App.vue

@@ -311,8 +311,8 @@ export default {
       infoText: '',
       loadingHandler: null,
       formData: {
-        // sceneCode: 'SS-t-XkquhxxurM',
-        sceneCode: 'SS-t-NZUICC2fRLi',
+        // sceneCode: process.env.NODE_ENV === 'production' ? '' : 'SS-t-XkquhxxurM',
+        sceneCode: process.env.NODE_ENV === 'production' ? '' : 'SS-t-NZUICC2fRLi',
         path1: process.env.NODE_ENV === 'production' ? '' : '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,47,76,101,125',
         path2: '',
         startPoint: process.env.NODE_ENV === 'production' ? '' : '-38.5, 10.8',
@@ -537,12 +537,13 @@ export default {
         that.infoText = ''
       })
 
-      gNode.selectAll('rect').on('click', function(e, d) {
+      gNode.selectAll('rect').on('dblclick', function(e, d) {
         // console.log(d)
         const id = d[d.length - 1]
         console.log(rawWholeData[id - 1])
         that.isEditingPoint = true
         that.pointDataForEditor = deepClone(rawWholeData[id - 1])
+        e.stopPropagation()
       })
     },
     renderPath() {

+ 6 - 0
src/components/PointEditor.vue

@@ -129,6 +129,7 @@ export default {
   backdrop-filter: blur(10px);
 }
 .point-editor .wrapper{
+  width: 500px;
   position: absolute;
   left: 50%;
   top: 50%;
@@ -136,4 +137,9 @@ export default {
   background-color: #fff;
   padding: 30px;
 }
+
+.point-editor .wrapper > .form > .btn-group {
+  width: fit-content;
+  margin-left: auto;
+}
 </style>