feat: add override internal copy function api
This commit is contained in:
@@ -3,6 +3,12 @@ import { CanvasEvent } from '../CanvasEvent'
|
||||
|
||||
export function copy(host: CanvasEvent) {
|
||||
const draw = host.getDraw()
|
||||
// 自定义粘贴事件
|
||||
const { copy } = draw.getOverride()
|
||||
if (copy) {
|
||||
copy()
|
||||
return
|
||||
}
|
||||
const rangeManager = draw.getRange()
|
||||
// 光标闭合时复制整行
|
||||
const copyElementList = rangeManager.getIsCollapsed()
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
export class Override {
|
||||
public paste: ((evt: ClipboardEvent) => void) | undefined
|
||||
public copy: (() => void) | undefined
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user