Skip to content

Commit

Permalink
Overlay: fixed errors preventing publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
VRiveland committed Oct 9, 2024
1 parent 662da1e commit fe71827
Showing 1 changed file with 22 additions and 25 deletions.
47 changes: 22 additions & 25 deletions src/control/overlay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,14 @@ export class Overlay<T> {
const target = this.elements[key] ?? undefined;
const ops = this.listeners[key];
if (ops && ops.onResize) {
requestAnimationFrame(
() =>
ops.onResize?.({
target,
source: this.source,
caller,
width,
height,
}),
requestAnimationFrame(() =>
ops.onResize?.({
target,
source: this.source,
caller,
width,
height,
}),
);
}
});
Expand All @@ -51,15 +50,14 @@ export class Overlay<T> {
const ops = this.listeners[key];

if (ops && ops.onMouseMove) {
requestAnimationFrame(
() =>
ops.onMouseMove?.({
x: mx,
y: my,
target,
source: this.source,
caller,
}),
requestAnimationFrame(() =>
ops.onMouseMove?.({
x: mx,
y: my,
target,
source: this.source,
caller,
}),
);
}
});
Expand All @@ -73,13 +71,12 @@ export class Overlay<T> {
const target = this.elements[key] || undefined;
const ops = this.listeners[key];
if (ops && ops.onMouseExit) {
requestAnimationFrame(
() =>
ops.onMouseExit?.({
target,
source: this.source,
caller,
}),
requestAnimationFrame(() =>
ops.onMouseExit?.({
target,
source: this.source,
caller,
}),
);
}
});
Expand Down

0 comments on commit fe71827

Please sign in to comment.