rename method

This commit is contained in:
“chrisshank” 2024-11-01 23:12:31 -07:00
parent 1ae63d29b5
commit 44bbffaf05
1 changed files with 5 additions and 5 deletions

View File

@ -51,7 +51,7 @@ export class AbstractArrow extends HTMLElement {
#sourceCallback = (entry: VisualObserverEntry) => { #sourceCallback = (entry: VisualObserverEntry) => {
this.#sourceRect = entry.contentRect; this.#sourceRect = entry.contentRect;
this.update(); this.#update();
}; };
#target = ''; #target = '';
@ -76,7 +76,7 @@ export class AbstractArrow extends HTMLElement {
#targetCallback = (entry: VisualObserverEntry) => { #targetCallback = (entry: VisualObserverEntry) => {
this.#targetRect = entry.contentRect; this.#targetRect = entry.contentRect;
this.update(); this.#update();
}; };
connectedCallback() { connectedCallback() {
@ -101,7 +101,7 @@ export class AbstractArrow extends HTMLElement {
if (vertex) { if (vertex) {
this.#sourceRect = DOMRectReadOnly.fromRect(vertex); this.#sourceRect = DOMRectReadOnly.fromRect(vertex);
this.update(); this.#update();
} else { } else {
const el = document.querySelector(this.source); const el = document.querySelector(this.source);
@ -127,7 +127,7 @@ export class AbstractArrow extends HTMLElement {
if (vertex) { if (vertex) {
this.#targetRect = DOMRectReadOnly.fromRect(vertex); this.#targetRect = DOMRectReadOnly.fromRect(vertex);
this.update(); this.#update();
} else { } else {
this.#targetElement = document.querySelector(this.#target); this.#targetElement = document.querySelector(this.#target);
@ -145,7 +145,7 @@ export class AbstractArrow extends HTMLElement {
visualObserver.unobserve(this.#targetElement, this.#targetCallback); visualObserver.unobserve(this.#targetElement, this.#targetCallback);
} }
update() { #update() {
if (this.#sourceRect === undefined || this.#targetRect === undefined) return; if (this.#sourceRect === undefined || this.#targetRect === undefined) return;
this.render(); this.render();