Feat/part 2 878 - #883
Open
lee00678 wants to merge 6 commits into
Open
Conversation
setData assigned the new data to the data model before comparing, so the change check compared the data with itself and never fired: the tooltip and crosshair were never hidden on data updates. The previous reference is now captured before assignment and compared by reference, which also removes a full deep-equality walk of the dataset on every setData call. isEqual() also gained a reference short-circuit for identical inputs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…urce leaks ComponentCore.destroy() now invokes a protected _onDestroy() hook (and is idempotent), giving components a place to release timers, animation frames, observers and global listeners: - Graph: stop the 35ms link-flow interval timer (previously it kept firing forever after destroy, retaining the whole component); remove the window keydown/keyup listeners and namespace them per instance uid so multiple graphs no longer override each other's shift-brush handlers - Crosshair: cancel the pending render animation frame and detach container mouse/wheel listeners - Axis: cancel the pending tick label collision detection frame - TopoJSONMap, LeafletMap: convert destroy() overrides that skipped super.destroy() (leaving isDestroyed() false and DOM attached) into _onDestroy() implementations - LeafletFlowMap: destroy the internal LeafletMap instance, which was previously never cleaned up Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…dratic scans Processing data in the setter previously ran several O(n^2) passes: multi-link detection filtered all links per link, per-node link lists filtered all links per node, state transfer scanned previous items per item, and link endpoint resolution scanned all nodes per endpoint (with a deep-equality comparison for object identifiers). Large graphs spent seconds of main-thread time in setData. All passes are now linear: links are grouped by canonical node-pair key, node link lists and previous-state lookups use maps, and string/object node identifiers resolve through id and reference indexes (keeping the deep-equality scan only as a fallback for value-equal object identifiers). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Component event dispatch collected the matched elements with selection.nodes() inside every event handler invocation; the elements are now snapshotted once at bind time (events are re-bound after every render, so the snapshot stays in sync). The tooltip's delegated mousemove handler queried all trigger elements for every configured trigger on every mouse movement; it now only queries them after an event-path match, when the element index is actually needed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…er of configs updateComponents matches configs to components positionally, so reordering or inserting a component silently mis-assigns configs. A console warning now surfaces the mismatch. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
SingleContainer hid the tooltip on every setData call (even with preventRender), while XYContainer only hid it on data changes and never on resize. Both containers now hide the tooltip (and XYContainer the crosshair) when the data actually changes and when the container is resized. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
What & why
part 2 of #878
All code has been reviewed
Checklist
pnpm dev:gallery)pnpm generate)pnpm build)pnpm cmds-report) -- report passesScreenshots / recordings