-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix chart width on resize and cleanup related code
Calculate AbstractOutputComponent's main area width based on props instead of client width that isn't updated yet during a resize. Ensure minimum of 0 for tree width and chart width. Remove unnecessary paddingRight in ResponsiveGridLayout's style. Add marginRight to TimeAxisComponent and TimeNavigatorComponent to account for scroll bar padding. Remove arbitrary initial width in TraceContextComponent constructor. Make handleWidth, yAxisWidth and sashWidth optional in OutputComponentStyle. Move default handle width constant to AbstractOutputComponent. Add getter for handle width. Move default Y-axis width and sash width constants to AbstractTreeOutputComponent. Add getters for Y-axis width and sash width. Rename sash offset to chart offset. Make chart offset include the handle width, Y-axis width and sash width, which makes these widths irrelevant to components that don't need them. Rename widthWPBugWorkaround to outputWidth. This needs to be stored in props because the ResponsiveGridLayout overrides the output component's style width before render. Calculate TimeNavigatorComponent and TimeAxisComponent width and pass it directly in their props so that they do not need to know about handle width, sash width and chart offset. Reduce TimeNavigatorProps and TimeAxisProps's style to only the necessary attributes. Signed-off-by: Patrick Tasse <patrick.tasse@ericsson.com>
- Loading branch information
1 parent
6d0d1b8
commit 5dc3985
Showing
12 changed files
with
67 additions
and
76 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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
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
8 changes: 4 additions & 4 deletions
8
packages/react-components/src/components/utils/output-component-style.ts
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
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
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
Oops, something went wrong.