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

textAlign:both和删除线共存的时候超出预期的问题 #336

Open
wzjiscode opened this issue Jan 22, 2025 · 1 comment
Open

textAlign:both和删除线共存的时候超出预期的问题 #336

wzjiscode opened this issue Jan 22, 2025 · 1 comment

Comments

@wzjiscode
Copy link

import { App, Rect, Text } from 'leafer-ui'
import '@leafer-in/editor' // 导入图形编辑器插件
import '@leafer-in/viewport' // 导入视口插件(可选)

const app = new App({ // [!code hl:4]
view: window,
editor: {} // 配置 editor 会自动创建并添加 app.editor 实例、tree 层、sky 层
})

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

const text = new Text({
fill: 'rgb(50,205,121)',
text: 'Welcome to LeaferJS',
editable: true,
textAlign: 'both',
textDecoration: 'delete',
})

app.tree.add(text)

@leaferjs
Copy link
Owner

收到,谢谢反馈~

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

2 participants