Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bits cannot be flipped in Colour Matcher interactive #1166

Closed
JackMorganNZ opened this issue Oct 15, 2019 · 3 comments · Fixed by #1167
Closed

Bits cannot be flipped in Colour Matcher interactive #1166

JackMorganNZ opened this issue Oct 15, 2019 · 3 comments · Fixed by #1167
Assignees
Labels

Comments

@JackMorganNZ
Copy link
Member

@JackMorganNZ JackMorganNZ commented Oct 15, 2019

In the Colour Matcher interactive, you should be able to click the bit values to flip a bit value (as suggested by the description). However this doesn't occur.

image

Tried in:

  • Google Chrome 77.0.3865.120
  • Microsoft Edge 44.18362.387.0
@eAlasdair

This comment has been minimized.

Copy link
Member

@eAlasdair eAlasdair commented Oct 16, 2019

Works fine in Chrome 75.0.3770.100 and Firefox 67.0.4

EDIT: But then stops after a minute or so

EDIT 2: Red continues to work fine, it's the other two that stop

@eAlasdair eAlasdair self-assigned this Oct 16, 2019
@eAlasdair

This comment has been minimized.

Copy link
Member

@eAlasdair eAlasdair commented Oct 16, 2019

Okay I figured it out.

The function updateSlidersFromRepresentation sets each of the 6 nouisliders individually, one after the other, without regard for which slider/binary representation for the slider actually changed.
The function update[num]bitPanel sets the binary representation based on all three sliders, not based on each one individually.

This was adequate, but recently the nouislider update trigger was bound to the update[num]bitPanel function. This means a change in any one slider affects all of the binary representation

So what happens is:

  • The user clicks a bit in the representation
  • The bit successfully flips
  • The red nouislider is updated (updateSliderFromRepresentation step 1 or 5)
  • The binary representation is set to the values of the nouisliders (update trigger)
    • If the flipped bit was not red, this reflips it because the respective slider hasn't been updated
  • The green nouislider is updated (updateSliderFromRepresentation step 2 or 6)
  • And so on
@JackMorganNZ

This comment has been minimized.

Copy link
Member Author

@JackMorganNZ JackMorganNZ commented Oct 17, 2019

Impressive work @eAlasdair!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.