Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
Update: added math.abs to avaoid -ve values
Browse files Browse the repository at this point in the history
  • Loading branch information
MadanKumarGovindaswamy committed Jan 9, 2024
1 parent a09f4db commit c66f453
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,12 @@ class CollapsibleMenuView extends React.Component {
// if no wrapper is used on top of collapsiblemenuview, use observer width value to calculate availableWidth space,
// or use menuButtonContainerWidth value to calculate availableWidth space
if (width < menuButtonContainerWidth) {
availableWidth = menuButtonContainerWidth - menuButtonWidth;
availableWidth = Math.abs(menuButtonContainerWidth - menuButtonWidth);
this.isContainerWidthUsedtoResize = true;
}
// to calculate available space when resized only when menuButtonContainerWidth is used
if ((window.innerWidth - menuButtonWidth) < availableWidth) {
availableWidth = window.innerWidth - menuButtonWidth;
if (Math.abs(window.innerWidth - menuButtonWidth) < availableWidth) {
availableWidth = Math.abs(window.innerWidth - menuButtonWidth);
}
let hiddenStartIndex = -1;
let calcWidth = 0;
Expand Down
2 changes: 1 addition & 1 deletion packages/terra-file-path/tests/wdio/file-path-spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Terra.describeViewports('On Click File Path', ['tiny', 'small'], () => {
});

it('should display file path with clinical header', () => {
browser.url('/raw/tests/cerner-terra-framework-docs/file-path/file-pathwith-clinical-header');
browser.url('/raw/tests/cerner-terra-framework-docs/file-path/file-pathwith-action-header');
browser.keys('Tab');
Terra.validates.element('file path with header');
browser.keys('Enter');
Expand Down

0 comments on commit c66f453

Please sign in to comment.