-
-
Notifications
You must be signed in to change notification settings - Fork 1k
fix: resolve issue #136 where "Add Node" popup has huge offset #195
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
Merged
stan-smith
merged 3 commits into
stan-smith:master
from
Abrar74774:fix/add-node-popup-offset
Jan 3, 2026
Merged
fix: resolve issue #136 where "Add Node" popup has huge offset #195
stan-smith
merged 3 commits into
stan-smith:master
from
Abrar74774:fix/add-node-popup-offset
Jan 3, 2026
Conversation
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
Owner
|
Legend! This one has been bugging me for ages! |
github-actions bot
pushed a commit
that referenced
this pull request
Jan 3, 2026
## [1.7.0](v1.6.1...v1.7.0) (2026-01-03) ### Features * read-only mode ([#168](#168)) ([85d32e6](85d32e6)) * transparent background for exporting as png ([#180](#180)) @F4tal1t thank you for contributing as always! ([ba1b376](ba1b376)) * **ui:** enhance custom color picker and fix docs ([#169](#169)) thank you [@non-stop-dev](https://github.com/non-stop-dev) ([f56812c](f56812c)) ### Bug Fixes * resolve issue [#136](#136) where "Add Node" popup has huge offset ([#195](#195)) ([fa5478e](fa5478e))
github-actions bot
pushed a commit
that referenced
this pull request
Jan 6, 2026
## [1.7.0](v1.6.1...v1.7.0) (2026-01-06) ### Features * read-only mode ([#168](#168)) ([85d32e6](85d32e6)) * transparent background for exporting as png ([#180](#180)) @F4tal1t thank you for contributing as always! ([ba1b376](ba1b376)) * **ui:** enhance custom color picker and fix docs ([#169](#169)) thank you [@non-stop-dev](https://github.com/non-stop-dev) ([f56812c](f56812c)) ### Bug Fixes * resolve issue [#136](#136) where "Add Node" popup has huge offset ([#195](#195)) ([fa5478e](fa5478e)) ### Documentation * fix remaining CONTRIBUTING.md links in readme ([#197](#197)) @Abrar74774 Thank you! ([cbf922d](cbf922d))
github-actions bot
pushed a commit
that referenced
this pull request
Jan 8, 2026
## [1.7.0](v1.6.1...v1.7.0) (2026-01-08) ### Features * read-only mode ([#168](#168)) ([85d32e6](85d32e6)) * transparent background for exporting as png ([#180](#180)) @F4tal1t thank you for contributing as always! ([ba1b376](ba1b376)) * **ui:** enhance custom color picker and fix docs ([#169](#169)) thank you [@non-stop-dev](https://github.com/non-stop-dev) ([f56812c](f56812c)) ### Bug Fixes * resolve issue [#136](#136) where "Add Node" popup has huge offset ([#195](#195)) ([fa5478e](fa5478e)) * resolve issue [#198](#198) where moving sliders pan view ([#199](#199)) ([af62f2f](af62f2f)) ### Documentation * fix remaining CONTRIBUTING.md links in readme ([#197](#197)) @Abrar74774 Thank you! ([cbf922d](cbf922d))
github-actions bot
pushed a commit
that referenced
this pull request
Jan 10, 2026
## [1.7.0](v1.6.1...v1.7.0) (2026-01-10) ### Features * add indonesian language ([#186](#186)) [@akmalsyrf](https://github.com/akmalsyrf) ([2ce342d](2ce342d)) * read-only mode ([#168](#168)) ([85d32e6](85d32e6)) * transparent background for exporting as png ([#180](#180)) @F4tal1t thank you for contributing as always! ([ba1b376](ba1b376)) * **ui:** enhance custom color picker and fix docs ([#169](#169)) thank you [@non-stop-dev](https://github.com/non-stop-dev) ([f56812c](f56812c)) ### Bug Fixes * build error caused by missing property in src/i18n/es-ES.ts ([#202](#202)) ([574b298](574b298)) * resolve issue [#136](#136) where "Add Node" popup has huge offset ([#195](#195)) ([fa5478e](fa5478e)) * resolve issue [#198](#198) where moving sliders pan view ([#199](#199)) ([af62f2f](af62f2f)) ### Documentation * fix remaining CONTRIBUTING.md links in readme ([#197](#197)) @Abrar74774 Thank you! ([cbf922d](cbf922d))
github-actions bot
pushed a commit
that referenced
this pull request
Jan 10, 2026
## [1.7.0](v1.6.1...v1.7.0) (2026-01-10) ### Features * add indonesian language ([#186](#186)) [@akmalsyrf](https://github.com/akmalsyrf) ([2ce342d](2ce342d)) * read-only mode ([#168](#168)) ([85d32e6](85d32e6)) * transparent background for exporting as png ([#180](#180)) @F4tal1t thank you for contributing as always! ([ba1b376](ba1b376)) * **ui:** enhance custom color picker and fix docs ([#169](#169)) thank you [@non-stop-dev](https://github.com/non-stop-dev) ([f56812c](f56812c)) ### Bug Fixes * build error caused by missing property in src/i18n/es-ES.ts ([#202](#202)) ([574b298](574b298)) * resolve issue [#136](#136) where "Add Node" popup has huge offset ([#195](#195)) ([fa5478e](fa5478e)) * resolve issue [#198](#198) where moving sliders pan view ([#199](#199)) ([af62f2f](af62f2f)) ### Documentation * fix remaining CONTRIBUTING.md links in readme ([#197](#197)) @Abrar74774 Thank you! ([cbf922d](cbf922d))
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.
So, apparently previously the positioning of the context menu was set on the MUI Menu component itself in
ContextMenu.tsx. I'm still not sure why this works perfectly on the default view area, but breaks after panning away. My guess is that it has something to do with MUI Menu's internal workings.I looked up the MUI Menu docs, and it felt like we're supposed to position the anchor element (Menu components
anchorEl) according to what we need instead of the Menu component, and then MUI will take care of positioning the Menu component. Ofcourse the docs dont explicitly say this, but using browser devtools you'll notice that the context menu element is positioned (using custom css top and left values) by MUI internally, regardless of if you've applied positioning on the Menu component or not.So this is basically what I did: migrate the positoning logic and apply it to the anchor element. I've also changed the opening and closing logic by following how the docs did it, otherwise the context menu position seems to glitch while opening.
From my testing, it seems to work perfectly, i.e. context menu appears right on the tile clicked on regardless of how much you panned.
So a relatively simple fix, but took me a WHILE to figure all this out 🙂.