We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
环境:电脑 + window 11 + chrome 132 + leaferjs 1.4.0 复现:拖动矩形到容器里可以触发Frame的DropEvent.DROP事件,但是鼠标放在文本上再拖动到容器里就不触发DROP事件了
import { App, Box, Frame, DropEvent, Group } from 'leafer-editor' const app = new App({ view: window, editor: {} }) const appContainer = new Group() app.tree.add(appContainer) app.on(DropEvent.DROP, (e: DropEvent) => { console.log('drop app', e.list); e.list.forEach((leaf) => { leaf.dropTo(appContainer) }) }) const container = new Frame({ width: 420, height: 600, overflow: 'show', fill: '#fff', stroke: '#000', strokeWidth: 0, editable: true, around: 'center', shadow: {x: 0, y: 0, blur: 4, color: '#999999aa'}, children: [ { x: -10, y: -30, tag: 'Text', text: '容器', padding: [10, 10], textAlign: 'left', fill: '#fff', verticalAlign:'top', event: { [DropEvent.DROP]: (e: DropEvent) => { e.stop() } } } ], event: { [DropEvent.DROP]: (e: DropEvent) => { console.log('drop container', e.list); e.list.forEach((leaf) => { leaf.dropTo(e.current) }) e.stop() } } }) const box = new Box({ width: 120, height: 80, overflow: 'show', around: 'center', resizeChildren: true, textBox: true, fill: '#fff', stroke: '#000', strokeWidth: 2, editable: true, children: [ { x: 0, y: 0, width: 120, height: 80, tag: 'Text', text: '文档', fill: 'black', padding: [10, 10], textAlign: 'center', verticalAlign:'middle' } ] }) appContainer.add(container) appContainer.add(box)
The text was updated successfully, but these errors were encountered:
收到,谢谢反馈~
Sorry, something went wrong.
No branches or pull requests
环境:电脑 + window 11 + chrome 132 + leaferjs 1.4.0
复现:拖动矩形到容器里可以触发Frame的DropEvent.DROP事件,但是鼠标放在文本上再拖动到容器里就不触发DROP事件了
1574.mp4
代码:
The text was updated successfully, but these errors were encountered: