feat: add zone field to contextmenu context

This commit is contained in:
Hufe921
2023-08-23 21:57:41 +08:00
parent a805590696
commit 2064236d94
2 changed files with 6 additions and 2 deletions
+4 -2
View File
@@ -138,7 +138,8 @@ export class ContextMenu {
const elementList = this.draw.getElementList()
const startElement = elementList[startIndex] || null
const endElement = elementList[endIndex] || null
// 当前区域
const zone = this.draw.getZone().getZone()
return {
startElement,
endElement,
@@ -146,7 +147,8 @@ export class ContextMenu {
editorHasSelection,
editorTextFocus,
isInTable,
isCrossRowCol
isCrossRowCol,
zone
}
}
@@ -1,4 +1,5 @@
import { Command } from '../../core/command/Command'
import { EditorZone } from '../../dataset/enum/Editor'
import { IElement } from '../Element'
export interface IContextMenuContext {
@@ -9,6 +10,7 @@ export interface IContextMenuContext {
editorTextFocus: boolean
isInTable: boolean
isCrossRowCol: boolean
zone: EditorZone
}
export interface IRegisterContextMenu {