-
Notifications
You must be signed in to change notification settings - Fork 117
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
fix(external pointer): avoid recursive-loops on pointer events #503
Merged
markov00
merged 2 commits into
elastic:master
from
markov00:2019-12-27_avoid-circular-loops-pointer-events
Jan 2, 2020
Merged
fix(external pointer): avoid recursive-loops on pointer events #503
markov00
merged 2 commits into
elastic:master
from
markov00:2019-12-27_avoid-circular-loops-pointer-events
Jan 2, 2020
Conversation
This file contains 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
If the consumer code doesn't take care of correctly distribute the pointer events avoiding feeding a chart with its own cursor position, it will end up with a recursive loop that ultimately throw a max stack trace. This provide the fix for such case BREAKING CHANGE: The `onCursorUpdate` Settings property is changed to a more generic `onPointerUpdate`. The same apply for the event type `CursorEvent` that is now `PointerEvent` and can assume a `PointerOverEvent` or `PointOutEvent` shape (see TS types)
Codecov Report
@@ Coverage Diff @@
## master #503 +/- ##
=========================================
+ Coverage 83.84% 84.55% +0.7%
=========================================
Files 158 169 +11
Lines 4729 4887 +158
Branches 963 983 +20
=========================================
+ Hits 3965 4132 +167
+ Misses 749 739 -10
- Partials 15 16 +1
Continue to review full report at Codecov.
|
4 tasks
markov00
pushed a commit
that referenced
this pull request
Jan 2, 2020
# [16.0.0](v15.0.5...v16.0.0) (2020-01-02) ### Bug Fixes * **external pointer:** avoid recursive-loops on pointer events ([#503](#503)) ([c170f0d](c170f0d)), closes [#504](#504) ### BREAKING CHANGES * **external pointer:** The `onCursorUpdate` Settings property is changed to a more generic `onPointerUpdate`. The same apply for the event type `CursorEvent` that is now `PointerEvent` and can assume a `PointerOverEvent` or `PointOutEvent` shape (see TS types)
🎉 This PR is included in version 16.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
AMoo-Miki
pushed a commit
to AMoo-Miki/OpenSearch-Dashboards
that referenced
this pull request
Feb 10, 2022
# [16.0.0](elastic/elastic-charts@v15.0.5...v16.0.0) (2020-01-02) ### Bug Fixes * **external pointer:** avoid recursive-loops on pointer events ([opensearch-project#503](elastic/elastic-charts#503)) ([8f9c258](elastic/elastic-charts@8f9c258)), closes [opensearch-project#504](elastic/elastic-charts#504) ### BREAKING CHANGES * **external pointer:** The `onCursorUpdate` Settings property is changed to a more generic `onPointerUpdate`. The same apply for the event type `CursorEvent` that is now `PointerEvent` and can assume a `PointerOverEvent` or `PointOutEvent` shape (see TS types)
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
If the consumer code doesn't take care of correctly distribute the pointer events avoiding feeding a chart with its own cursor position, it will end up with a recursive loop that ultimately throw a max stack trace. This provide the fix for such case.
BREAKING CHANGE: The
onCursorUpdate
Settings property is changed to a more genericonPointerUpdate
. The same apply for the event typeCursorEvent
that is nowPointerEvent
and can assume aPointerOverEvent
orPointOutEvent
shape (see TS types)To test on previous version:
fix #504
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.src/index.ts
(and stories only import from../src
except for test data & storybook)[ ] Proper documentation or storybook story was added for features that require explanation or tutorials