// #图形编辑器 [手动选择元素]
import { App, Rect,Group,Text } 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,})
const text=new Text({
text:"测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本",
fontSize:24,
fill: 'red', cornerRadius: [20, 0, 0, 20] ,x:100, y:100,width:200},
)
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))
g.add(text)
app.tree.add(g)

// #图形编辑器 [手动选择元素]
import { App, Rect,Group,Text } 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,})
const text=new Text({
text:"测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本测试文本",
fontSize:24,
fill: 'red', cornerRadius: [20, 0, 0, 20] ,x:100, y:100,width:200},
)
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))
g.add(text)
app.tree.add(g)