Make the stopEvent methods private
This commit is contained in:
parent
3ae7e9489a
commit
032f2564c1
1 changed files with 8 additions and 8 deletions
|
|
@ -55,8 +55,8 @@ export class PopoverEventManager {
|
||||||
if (this.#options.lockable) {
|
if (this.#options.lockable) {
|
||||||
this.#element.removeEventListener(`pointerup`, this.#pointerUpHandler);
|
this.#element.removeEventListener(`pointerup`, this.#pointerUpHandler);
|
||||||
};
|
};
|
||||||
this.stopOpen();
|
this.#stopOpen();
|
||||||
this.stopClose();
|
this.#stopClose();
|
||||||
};
|
};
|
||||||
|
|
||||||
close() {
|
close() {
|
||||||
|
|
@ -64,14 +64,14 @@ export class PopoverEventManager {
|
||||||
this.#framed?.close({ force: true });
|
this.#framed?.close({ force: true });
|
||||||
};
|
};
|
||||||
|
|
||||||
stopOpen() {
|
#stopOpen() {
|
||||||
if (this.#openTimeout != null) {
|
if (this.#openTimeout != null) {
|
||||||
clearTimeout(this.#openTimeout);
|
clearTimeout(this.#openTimeout);
|
||||||
this.#openTimeout = null;
|
this.#openTimeout = null;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
stopClose() {
|
#stopClose() {
|
||||||
if (this.#closeTimeout != null) {
|
if (this.#closeTimeout != null) {
|
||||||
clearTimeout(this.#closeTimeout);
|
clearTimeout(this.#closeTimeout);
|
||||||
this.#closeTimeout = null;
|
this.#closeTimeout = null;
|
||||||
|
|
@ -109,8 +109,8 @@ export class PopoverEventManager {
|
||||||
#clickHandler() {
|
#clickHandler() {
|
||||||
Logger.debug(`click event handler`);
|
Logger.debug(`click event handler`);
|
||||||
// Cleanup for the frameless lifecycle
|
// Cleanup for the frameless lifecycle
|
||||||
this.stopOpen();
|
this.#stopOpen();
|
||||||
this.stopClose();
|
this.#stopClose();
|
||||||
this.#frameless?.close({ force: true });
|
this.#frameless?.close({ force: true });
|
||||||
|
|
||||||
if (!this.#framed) {
|
if (!this.#framed) {
|
||||||
|
|
@ -120,7 +120,7 @@ export class PopoverEventManager {
|
||||||
};
|
};
|
||||||
|
|
||||||
#pointerEnterHandler(event) {
|
#pointerEnterHandler(event) {
|
||||||
this.stopClose();
|
this.#stopClose();
|
||||||
|
|
||||||
const pos = event.target.getBoundingClientRect();
|
const pos = event.target.getBoundingClientRect();
|
||||||
const x = pos.x + Math.floor(pos.width / 2);
|
const x = pos.x + Math.floor(pos.width / 2);
|
||||||
|
|
@ -161,7 +161,7 @@ export class PopoverEventManager {
|
||||||
};
|
};
|
||||||
|
|
||||||
#pointerOutHandler() {
|
#pointerOutHandler() {
|
||||||
this.stopOpen();
|
this.#stopOpen();
|
||||||
|
|
||||||
this.#closeTimeout = setTimeout(
|
this.#closeTimeout = setTimeout(
|
||||||
() => {
|
() => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue