Skip to content

Commit

Permalink
Merge pull request #25 from muonlineph/dev
Browse files Browse the repository at this point in the history
fix: animation on radio button click
  • Loading branch information
weaponsforge authored Oct 6, 2024
2 parents 04709b5 + fbcea4a commit 8b9f669
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions public/viewer.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,12 @@ Viewer.prototype.onWindowResize = function() {
Viewer.prototype.onClick = function(e) {
const { target } = e

// Skip processing radio button clicks
if (target?.tagName === 'INPUT' && target?.type === 'radio') return
// Skip processing radio button clicks if anim is running
if (
target?.tagName === 'INPUT' &&
target?.type === 'radio' &&
this.animationFrameId
) return

if (this.animationFrameId) {
this.stopAnimation()
Expand Down

0 comments on commit 8b9f669

Please sign in to comment.