feat:菜单栏交互状态
This commit is contained in:
@@ -23,12 +23,13 @@ export class GlobalEvent {
|
||||
|
||||
register() {
|
||||
this.cursor = this.draw.getCursor()
|
||||
|
||||
document.addEventListener('keyup', () => {
|
||||
this.setRangeStyle()
|
||||
})
|
||||
document.addEventListener('click', (evt) => {
|
||||
this.recoverCursor(evt)
|
||||
this.setRangeStyle()
|
||||
})
|
||||
|
||||
document.addEventListener('mouseup', () => {
|
||||
this.setDragState()
|
||||
})
|
||||
|
||||
@@ -59,13 +59,13 @@ export class RangeManager {
|
||||
const color = curElement.color || null
|
||||
const highlight = curElement.highlight || null
|
||||
// 菜单
|
||||
const format = !!this.draw.getPainterStyle()
|
||||
const painter = !!this.draw.getPainterStyle()
|
||||
const undo = this.historyManager.isCanUndo()
|
||||
const redo = this.historyManager.isCanRedo()
|
||||
this.listener.rangeStyleChange({
|
||||
undo,
|
||||
redo,
|
||||
format,
|
||||
painter,
|
||||
bold,
|
||||
italic,
|
||||
underline,
|
||||
|
||||
Reference in New Issue
Block a user