-
Notifications
You must be signed in to change notification settings - Fork 26
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 disappearing sidebar button #6555
Conversation
@@ -60,7 +60,8 @@ export function getPositionStatusOf(tabSetNode: TabSetNode): NodePositionStatus | |||
// of the root container that contains everything except for the borders. | |||
isLeftMost = tabSetNodeRect.x === rootContainerRect.x; | |||
isRightMost = | |||
tabSetNodeRect.x + tabSetNodeRect.width === rootContainerRect.x + rootContainerRect.width; | |||
tabSetNodeRect.x + tabSetNodeRect.width === | |||
Math.trunc(rootContainerRect.x + rootContainerRect.width); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rootContainer.x and .width contain fractions in some case. This caused the comparisons to be, .e.g 25 == 25.234543
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be even more fail-safe to also truncate the tabSetNodeRect
values in line 63? From the documentation I cannot see why rootContainerRect
could sometimes be float but tabSetNodeRect
could not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
25 == 25.234543
Could the comparison also turn out to be 25 == 24.999
? In that case trunc
wouldn't work. Maybe calculate Math.abs(x - y) <= 1
or something like that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have no idea how the fractions are derived. In my testing it worked with 80% - 250% browser scaling without issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice find and fix! Please see my one suggestion :)
@@ -60,7 +60,8 @@ export function getPositionStatusOf(tabSetNode: TabSetNode): NodePositionStatus | |||
// of the root container that contains everything except for the borders. | |||
isLeftMost = tabSetNodeRect.x === rootContainerRect.x; | |||
isRightMost = | |||
tabSetNodeRect.x + tabSetNodeRect.width === rootContainerRect.x + rootContainerRect.width; | |||
tabSetNodeRect.x + tabSetNodeRect.width === | |||
Math.trunc(rootContainerRect.x + rootContainerRect.width); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be even more fail-safe to also truncate the tabSetNodeRect
values in line 63? From the documentation I cannot see why rootContainerRect
could sometimes be float but tabSetNodeRect
could not.
…ebar_button * 'master' of github.com:scalableminds/webknossos: added more usage shortcuts to status bar (#6549) Look up annotation dataset by tracing id instead of (broken) organizationName field (#6548) Add links to resource creation pages (#6513) Improve Zarr Import UI (and general editing of datasets) (#6485) Remove unused dataSetName and organizationName property of protobuf objects (#6559) WIP: Added manual task assignment (#6551) Fix zarr private links for volume tracings and some minor improvements to private links UI (#6541) Fix stack overflow in compactMovedNodesAndEdges (#6557)
…ault_volume_layer * 'master' of github.com:scalableminds/webknossos: (21 commits) adds ETA calculation to voxelytics tasks (#6564) update immutability-helper package to v3.1.1 with TS support (#6565) [Skeletons] Allow deletion of root group (#6553) fix disappearing sidebar button (#6555) Enable "What's new" in navbar for everybody (#6563) Highlight Menu in Navbar Menu (#6558) refactor Select loading spinner property (#6556) Reload histogram when reloading layer (#6537) added more usage shortcuts to status bar (#6549) Look up annotation dataset by tracing id instead of (broken) organizationName field (#6548) Add links to resource creation pages (#6513) Improve Zarr Import UI (and general editing of datasets) (#6485) Remove unused dataSetName and organizationName property of protobuf objects (#6559) WIP: Added manual task assignment (#6551) Fix zarr private links for volume tracings and some minor improvements to private links UI (#6541) Fix stack overflow in compactMovedNodesAndEdges (#6557) Add backspace keyboard shortcut to delete active node (#6554) fix scaling in new meshfile rendering (#6552) Added more filters and sorting options to Projects list (#6550) fix double occurance of "ago" in VX progress times (#6535) ...
PR fix a long-standing issues where the little button to toggle the right-hand side panel would disappear when using the browser's builtin zoom. The issue is related to a float vs int comparison.
URL of deployed dev instance (used for testing):
Steps to test:
Issues:
(Please delete unneeded items, merge only when none are left open)