Skip to content

Commit

Permalink
feat(ui5-tabcontainer): Responsive paddings are now supported
Browse files Browse the repository at this point in the history
Fixes: SAP#2539
  • Loading branch information
TeodorTaushanov committed Feb 5, 2021
1 parent a347626 commit 9c673c4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,5 +77,8 @@
"packages/ie11",
"packages/tools",
"packages/playground"
]
],
"dependencies": {
"chromedriver": "^88.0.0"
}
}
15 changes: 8 additions & 7 deletions packages/base/src/Device.js
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ const isMobile = () => {
return Device.browser.mobile;
};

//******** Match Media ********
//* ******* Match Media ********

/**
* API for screen width changes.
Expand Down Expand Up @@ -843,9 +843,9 @@ const isMobile = () => {
*/
const _initRangeSet = (name, borders, names) => {
Device.media._querySets[name] = {
borders: borders,
names: names
}
borders,
names,
};
};

/**
Expand All @@ -864,13 +864,14 @@ const _initRangeSet = (name, borders, names) => {
* @public
*/
const _getCurrentRange = (name, width = window.innerWidth) => {
let querySet = Device.media._querySets[name];
const querySet = Device.media._querySets[name];
let i = 0;

if (!querySet) {
return null;
}

for (var i = 0; i < querySet.borders.length; i++) {
for (i; i < querySet.borders.length; i++) {
if (width < querySet.borders[i]) {
return querySet.names[i];
}
Expand All @@ -883,7 +884,7 @@ const _setMedia = () => {
Device.media = {
_querySets: {},
initRangeSet: _initRangeSet,
getCurrentRange: _getCurrentRange
getCurrentRange: _getCurrentRange,
};
};

Expand Down

0 comments on commit 9c673c4

Please sign in to comment.