Skip to content

Commit

Permalink
Smoothing transition while refreshing sponsor icons (betaflight#3895)
Browse files Browse the repository at this point in the history
Fade in and out sponsor icons on refresh
  • Loading branch information
haslinghuis authored and chmelevskij committed Apr 27, 2024
1 parent 18bd3ff commit 11bb02c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/js/Sponsor.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ export default class Sponsor {
this._api.loadSponsorTile(DarkTheme.enabled ? 'dark' : 'light', this._name,
(content) => {
if (content) {
this._div.html(content);
this._div.fadeOut(500, () => {
this._div.html(content);
this._div.fadeIn(500);
});
this._div.show();
} else {
this._div.hide();
Expand Down

0 comments on commit 11bb02c

Please sign in to comment.