Skip to content

Commit

Permalink
UI adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
pschroen committed Mar 25, 2024
1 parent e18da34 commit e827905
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 25 deletions.
4 changes: 2 additions & 2 deletions assets/js/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/loader.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions examples/ui.html
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,6 @@

// Event handlers

static onUpdate = () => {
this.ui.update();
};

static onLoad = () => {
this.ui.animateIn();
};

static onDetails = e => {
console.log('Details event:', e);
};
Expand All @@ -118,6 +110,14 @@

localStorage.setItem('sound', JSON.stringify(e.sound));
};

static onUpdate = () => {
this.ui.update();
};

static onLoad = () => {
this.ui.animateIn();
};
}

App.init();
Expand Down
20 changes: 10 additions & 10 deletions examples/ui_components.html
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,16 @@

// Event handlers

onClick = () => {
this.detailsButton3.setData({
count: Number(this.detailsButton3.number.text()) + 1
});

this.detailsButton4.setData({
count: Number(this.detailsButton4.number.text()) + 1
});
};

onResize = async () => {
await defer();

Expand Down Expand Up @@ -361,16 +371,6 @@
this.muteButton2.update();
};

onClick = () => {
this.detailsButton3.setData({
count: Number(this.detailsButton3.number.text()) + 1
});

this.detailsButton4.setData({
count: Number(this.detailsButton4.number.text()) + 1
});
};

// Public methods

animateIn = () => {
Expand Down
4 changes: 0 additions & 4 deletions src/ui/Point.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,6 @@ export class Point extends Interface {
};

onHover = async ({ type }) => {
if (!this.ui) {
return;
}

await defer();

if (type === 'mouseenter') {
Expand Down

0 comments on commit e827905

Please sign in to comment.