Skip to content
New issue

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

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

Already on GitHub? # to your account

Insertion markers strobe when snap radius is increased #2217

Open
NeilFraser opened this issue Jan 13, 2019 · 2 comments
Open

Insertion markers strobe when snap radius is increased #2217

NeilFraser opened this issue Jan 13, 2019 · 2 comments

Comments

@NeilFraser
Copy link
Contributor

On develop, go to playground. Insertion markers work as expected.

On the console type: Blockly.SNAP_RADIUS *= 2

Now insertion markers flicker badly.

@RoboErikG
Copy link
Contributor

This is because you also need to change CONNECTING_SNAP_RADIUS, which is how we add hysteresis to the snap radius.

I don't think it makes sense to have an API for adjusting these values at runtime, would a comment that if you adjust one you need to adjust the other be appropriate?

@NeilFraser
Copy link
Contributor Author

NeilFraser commented Jan 22, 2019

Thanks. Knowing about CONNECTING_SNAP_RADIUS solves the issue in Blockly Games. I'll leave this issue open so you can figure out if it's

  • just a documentation issue,
  • or whether there's some sort of max(CONNECTING_SNAP_RADIUS, SNAP_RADIUS) that should be there,
  • or whether CONNECTING_SNAP_RADIUS can be removed as a constant and be computed from SNAP_RADIUS instead,
  • or whether CONNECTING_SNAP_RADIUS becomes a multiplier of SNAP_RADIUS, defaulting to 1.0,
  • or whether a console warning can be printed if flickering is detected informing the developer what constant to tweak,
  • or whether CONNECTING_SNAP_RADIUS should default to -1 which signals that SNAP_RADIUS be used instead,
  • or something else...

Just some options to consider.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

3 participants