Merge pull request #15074 from calixteman/ink3
Only activate ink editor if none is selected
This commit is contained in:
commit
6ee538e0ba
@ -113,7 +113,11 @@ class AnnotationEditorLayer {
|
|||||||
* @param {MouseEvent} event
|
* @param {MouseEvent} event
|
||||||
*/
|
*/
|
||||||
mouseover(event) {
|
mouseover(event) {
|
||||||
if (event.target === this.div && event.buttons === 0) {
|
if (
|
||||||
|
event.target === this.div &&
|
||||||
|
event.buttons === 0 &&
|
||||||
|
!this.#uiManager.hasActive()
|
||||||
|
) {
|
||||||
// The div is the target so there is no ink editor, hence we can
|
// The div is the target so there is no ink editor, hence we can
|
||||||
// create a new one.
|
// create a new one.
|
||||||
// event.buttons === 0 is here to avoid adding a new ink editor
|
// event.buttons === 0 is here to avoid adding a new ink editor
|
||||||
|
@ -570,6 +570,14 @@ class AnnotationEditorUIManager {
|
|||||||
return this.#activeEditor;
|
return this.#activeEditor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Check if there is an active editor.
|
||||||
|
* @returns {boolean}
|
||||||
|
*/
|
||||||
|
hasActive() {
|
||||||
|
return this.#activeEditor !== null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the current editor mode.
|
* Get the current editor mode.
|
||||||
* @returns {number}
|
* @returns {number}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user