Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug Report] 背景组件的辅助线位置错误 #370

Open
kevinhwu opened this issue Sep 21, 2021 · 0 comments
Open

[Bug Report] 背景组件的辅助线位置错误 #370

kevinhwu opened this issue Sep 21, 2021 · 0 comments

Comments

@kevinhwu
Copy link

问题描述
背景组件(lbp-background)的辅助线位置错误。

追踪到下面的代码中,获取到的背景尺寸是错误的。

calcVHLine (isPointMove) {
      const uuid = this.editingElement.uuid
      const referElements = this.elements.filter(e => e.uuid !== uuid)
      let referElementsXCoords = []
      let referElementsYCoords = []
      referElements.forEach(e => {
        const width = e.commonStyle.width // 读到的背景宽度是100,实际是320,下面几行读到的都是错误的。
        const left = e.commonStyle.left
        const height = e.commonStyle.height
        const top = e.commonStyle.top

        referElementsXCoords = [
          ...referElementsXCoords,
          left,
          left + (width / 2),
          left + width
        ]
        referElementsYCoords = [
          ...referElementsYCoords,
          top,
          top + (height / 2),
          top + height
        ]
      })

环境描述/版本信息 (请完成如下信息)

  • OS: windows
  • Browser: chrome
  • 本地开发版本最近版本(2021/9/21)

如何复现
复现步骤

  1. 编辑一个页面,添加一个组件
  2. 在背景上拖动组件,显示辅助线

预期结果

背景辅助线位置应该正确

@kevinhwu kevinhwu changed the title [Bug Report/Feeback] [Bug Report] 背景组件的辅助线位置错误 Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant