-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Updating bump logic to support single-direction scrollbars #4652
Conversation
46f2bdc
to
ea04ab0
Compare
644cd11
to
f8a9a47
Compare
f8a9a47
to
5769269
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessarily in this PR, but I am curious what your thoughts are on pulling out the bump logic from inject? I think this would give us the ability to register the class later on, so someone could create their own bump blocks logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few small comments left, but then lgtm!
core/inject.js
Outdated
@@ -387,7 +384,7 @@ Blockly.init_ = function(mainWorkspace) { | |||
mainWorkspace, true, true, 'blocklyMainWorkspaceScrollbar'); | |||
mainWorkspace.scrollbar.resize(); | |||
} else { | |||
mainWorkspace.setMetrics({x: 0.5, y: 0.5}); | |||
mainWorkspace.setMetrics({x: 0, y: 0}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just curious, why the change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe I changed it because it fixed unit tests. However it looks like it doesn't make a difference now, so I'll change it back.
I think it's possible that the scrollbar logic refactor PR may have something to do with it.
The basics
The details
Resolves
Part of #1292
Proposed Changes
getScrollMetrics
and adds scroll metrics to the metrics objectBlockly.utils.Metrics
)Reason for Changes
Necessary to support single-direction scrollbar
Test Coverage
Extensive manual testing in playground. Mocha tests.
Tested on:
Documentation
Additional Information
Remake of #4618