Skip to content

Group元素不设置 "hitChildren": false,时,全选元素拖动会跑偏 #821

@ZhengNan-coder

Description

@ZhengNan-coder

// #图形编辑器 [手动选择元素]
import { App, Rect,Group } from 'leafer-ui'
import '@leafer-in/editor' // 导入图形编辑器插件
import '@leafer-in/viewport' // 导入视口插件 (可选)

const app = new App({
view: window,
editor: {}
})
const g=new Group({ editable: true,}) // 无 "hitChildren": false,

g.add(Rect.one({ editable: true, fill: '#FEB027', cornerRadius: [20, 0, 0, 20] }, 100, 100))
g.add(Rect.one({ editable: true, fill: '#FFE04B', cornerRadius: [0, 20, 20, 0] }, 300, 100))

app.tree.add(g)

Image
2026-03-30.14.04.57.mov

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions