Merged
Conversation
Debounce the snap line setter by 10 ms to ensure smoother snap line display. This both ensures that the mouse move handler returns quickly (by moving the actual update to a background `setTimeout` call) and also ensure that multiple updates within a short timeframe don't cause multiple short-lived renders.
westonruter
added a commit
that referenced
this pull request
Oct 18, 2019
…alidation-sourcing * 'develop' of github.com:ampproject/amp-wp: (57 commits) Undo over-eager rename of auto_accept_sanitization Rename auto-accept to accept-by-default Rename filter to amp_validation_error_auto_sanitized Fix jumping blocks when changing fonts (#3529) Update dependency browserslist to v4.7.1 (#3551) Make sure that isPageBlock always returns boolean. Fix and improve e2e tests. Remove unnessary check for block. Use shift over access first element of array. Use isPageBlock for cleaner code. Fix minor grammar issues Add docblock for `amp_is_sanitization_auto_accepted` filter Align arrows Update tests to use filter to set sanitization auto acceptance Make AMP_Validation_Manage::is_sanitization_auto_accepted() filterable Remove 'auto_accept_sanitization' option Remove relevant auto-sanitization notices Remove validation handling setting field Add special-case handling for layout=fill when both dimensions are 100% Insert duplicated page as current page. Ensure smooth snap line display (#3514) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Optimizes snap line display while dragging elements on a page with multiple other elements.
Fixes #3458.
Todo
Debounce the snap line setter by 10 ms to ensure smoother snap line display.
Split snap targets in edge targets and center targets and calculate potential snap lines for each separately.
Checklist