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

AG-13489 Remove unused code & clean up #3285

Draft
wants to merge 13 commits into
base: latest
Choose a base branch
from

Conversation

olegat
Copy link
Contributor

@olegat olegat commented Dec 17, 2024

This is step 1 to untangle all the inter-dependencies with all various different
managers.
We need offsets relative to the HTMLElement that we are listening to. The
RegionManager has canvasXY for that. These offsets are useful, so add a
generalised version of these to MouseWidgetEvent: currentXY, which are offsets
relative to the sourceEvent.currentTarget (which is the widget that is listening
for events).

Also, add listeners to the containerWidget. This is because the zoom toolbar is
not a descendant of .ag-charts-series-area, so a 'mouseleave' is fired whenever
the pointer hovers over a zoom button, which hides the toolbar. We don't want
that. However, the zoom toolbar is a descendant of .ag-charts-canvas-container
so we can add a listener there instead. This also has the added affect of
showing the zoom toolbar when hovering over the axes (when onHover's bounds
hit-testing logic is true), which is the expected behaviour in production.
This reduces code duplication and improves readability.
This reduces code duplication, and also makes it easier to see which parts of
the codebase share common bitmasks for `InteractionManager.isState()`.
This file adds unnecessary complexity. Eventually, we'll just be using something
like WidgetEvent.preventDefault().
@olegat olegat added the blocked label Dec 17, 2024
Copy link
Contributor

Snapshots automatically updated, please review before merge: diff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant