zhu.yawen 1 рік тому
батько
коміт
b63a663a5f

+ 3 - 3
data-room-ui/packages/BigScreenDesign/RulerTool/SketchRuler.vue

@@ -349,7 +349,7 @@ export default {
       const canvasRect = document
         .querySelector('#canvas')
         .getBoundingClientRect()
-      const container = document.querySelector('#selectWin').getBoundingClientRect()
+      // const container = document.querySelector('#selectWin').getBoundingClientRect()
       const screenContainer = document.querySelector('#screen-container').getBoundingClientRect()
       const draggableElement = document.getElementById('selectionWin')
       // 标尺开始的刻度
@@ -368,8 +368,8 @@ export default {
         const leftDrag = canvasRect.left - this.canvasLeft
         const topDrag = canvasRect.top - this.canvasTop
         // 小方块需要移动的距离
-        const leftLength = leftDrag / (screenContainer.width - screensRect.width - 9) * (container.width - draggableElement.getBoundingClientRect().width)
-        const topLength = topDrag / (screenContainer.height - screensRect.height - 9) * (container.height - draggableElement.getBoundingClientRect().height)
+        const leftLength = leftDrag / (screenContainer.width - screensRect.width - 9) * (150 - 30)
+        const topLength = topDrag / (screenContainer.height - screensRect.height - 9) * (150 - 30)
         draggableElement.style.left = -leftLength + 'px'
         draggableElement.style.top = -topLength + 'px'
       }

+ 13 - 0
data-room-ui/packages/BigScreenDesign/SettingPanel.vue

@@ -65,6 +65,19 @@ export default {
     return {
     }
   },
+  watch: {
+    rightVisiable (value) {
+      if (value) {
+        const leftElement = document.querySelector('.bs-left-panel')
+        const contentElement = document.querySelector('.grid-wrap-box')
+        // const rightElement = document.querySelector('.bs-right-panel-wrap')
+        const mapElement = document.querySelector('.minimap')
+        if (parseInt(window.getComputedStyle(mapElement).right) > parseInt(window.getComputedStyle(leftElement).width) + parseInt(window.getComputedStyle(contentElement).width) - 320 - parseInt(window.getComputedStyle(mapElement).width)) {
+          mapElement.style.right = parseInt(window.getComputedStyle(leftElement).width) + parseInt(window.getComputedStyle(contentElement).width) - 320 - parseInt(window.getComputedStyle(mapElement).width) + 'px'
+        }
+      }
+    }
+  },
   computed: {
     ...mapState('bigScreen', {
       activeItem: state => state.activeItemConfig,

+ 1 - 0
data-room-ui/packages/BigScreenDesign/index.vue

@@ -244,6 +244,7 @@ export default {
       if (!value) {
         mapElement.style.bottom = parseFloat(window.getComputedStyle(mapElement).bottom) + 150 + 'px'
       } else {
+        this.$refs.Rules.handleScroll()
         mapElement.style.bottom = parseFloat(window.getComputedStyle(mapElement).bottom) - 150 + 'px'
       }
     },