Skip to content

Commit

Permalink
Cleaned src files for Lint
Browse files Browse the repository at this point in the history
  • Loading branch information
julienetie committed May 3, 2017
1 parent b3f1f20 commit 66a0c82
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 14 deletions.
21 changes: 10 additions & 11 deletions src/mutate-root-font-size-partial.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,23 @@ const mutateRootFontSizePartial = rootElement => (
enableScale,
isMobileLikeDevice,
) => {
if(resizeWithoutZoom || renderOnce){
if (hasScaledOrDPRIsDefault || renderOnce) {
if (isBeyondCutoff || renderOnce) {
if (isBeyondCutoff && enableScale && !isMobileLikeDevice) {
// eslint-disable-next-line
console.log('RENDERED')
rootElement.style.fontSize = rootFontSizeFinal.toFixed(4) + 'rem';
renderOnce = false;
if (resizeWithoutZoom || renderOnce) {
if (hasScaledOrDPRIsDefault || renderOnce) {
if (isBeyondCutoff || renderOnce) {
if (isBeyondCutoff && enableScale && !isMobileLikeDevice) {
// eslint-disable-next-line
rootElement.style.fontSize = rootFontSizeFinal.toFixed(4) + 'rem';
renderOnce = false;
} else {
rootElement.removeAttribute('style');
}
} else {
rootElement.removeAttribute('style');
}
} else {
rootElement.removeAttribute('style');
}
} else {
rootElement.removeAttribute('style');
}
}
};


Expand Down
4 changes: 2 additions & 2 deletions src/resize-root-font-size.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ const resizeRootFontSize = (settings, setRootFontSizeTail) => {
if (setRootFontSizeTail) {
setRootFontSizeTimeoutId = setTimeout(
() => {
setRootFontSizeTail();
setRootFontSizeTail();
setRootFontSizeTail();
setRootFontSizeTail();
}, lateDetectionDelay,
);
}
Expand Down
2 changes: 1 addition & 1 deletion test/set-root-font-size-partial.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ describe('setRootFontSizePartial', () => {
it('Should exist', () => {
expect(setRootFontSizePartial).to.be.a('function');
});
});
});

0 comments on commit 66a0c82

Please sign in to comment.