Skip to content

Commit

Permalink
fix: 修复拖拽过程中位置不能为0的问题 (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
lvpangpang authored Jul 24, 2023
1 parent 74c034b commit 9b23a6e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ const data = {
},

setShapeStyle({ curComponent }, { top, left, width, height, rotate }) {
if (top) curComponent.style.top = Math.round(top)
if (left) curComponent.style.left = Math.round(left)
if (top !== undefined) curComponent.style.top = Math.round(top)
if (left !== undefined) curComponent.style.left = Math.round(left)
if (width) curComponent.style.width = Math.round(width)
if (height) curComponent.style.height = Math.round(height)
if (rotate) curComponent.style.rotate = Math.round(rotate)
Expand Down

0 comments on commit 9b23a6e

Please sign in to comment.