Skip to content
This repository was archived by the owner on Jan 19, 2023. It is now read-only.

Commit bdb409a

Browse files
committed
Appease linter
1 parent 68d91b8 commit bdb409a

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

.babelrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"presets": ["es2015", "react"],
3-
"plugins": ["transform-object-rest-spread"]
3+
"plugins": ["transform-object-rest-spread", "babel-plugin-transform-exponentiation-operator"]
44
}

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"babel-core": "^6.10.4",
4343
"babel-eslint": "^7.1.0",
4444
"babel-loader": "^6.2.4",
45+
"babel-plugin-transform-exponentiation-operator": "^6.8.0",
4546
"babel-plugin-transform-object-rest-spread": "^6.8.0",
4647
"babel-preset-es2015": "^6.9.0",
4748
"babel-preset-react": "^6.11.1",

src/react-image-lightbox.js

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ class ReactImageLightbox extends Component {
391391
* Get sizing when the image is scaled
392392
*/
393393
getZoomMultiplier(zoomLevel = this.state.zoomLevel) {
394-
return Math.pow(ZOOM_RATIO, zoomLevel);
394+
return ZOOM_RATIO ** zoomLevel;
395395
}
396396

397397
/**
@@ -1045,7 +1045,8 @@ class ReactImageLightbox extends Component {
10451045
onAfterOpen={() => this.outerEl && this.outerEl.focus()} // Focus on the div with key handlers
10461046
style={modalStyle}
10471047
>
1048-
<div // Floating modal with closing animations
1048+
<div // eslint-disable-line jsx-a11y/no-static-element-interactions
1049+
// Floating modal with closing animations
10491050
className={`outer ril-outer ${styles.outer} ${styles.outerAnimating}` +
10501051
(isClosing ? ` closing ril-closing ${styles.outerClosing}` : '')
10511052
}
@@ -1065,14 +1066,15 @@ class ReactImageLightbox extends Component {
10651066
onKeyUp={this.handleKeyInput}
10661067
>
10671068

1068-
<div // Image holder
1069+
<div // eslint-disable-line jsx-a11y/no-static-element-interactions
1070+
// Image holder
10691071
className={`inner ril-inner ${styles.inner}`}
10701072
onClick={clickOutsideToClose ? this.closeIfClickInner : noop}
10711073
>
10721074
{images}
10731075
</div>
10741076

1075-
{!prevSrc ? '' :
1077+
{prevSrc &&
10761078
<button // Move to previous image button
10771079
type="button"
10781080
className={`prev-button ril-prev-button ${styles.navButtons} ${styles.navButtonPrev}`}
@@ -1081,7 +1083,7 @@ class ReactImageLightbox extends Component {
10811083
/>
10821084
}
10831085

1084-
{!nextSrc ? '' :
1086+
{nextSrc &&
10851087
<button // Move to next image button
10861088
type="button"
10871089
className={`next-button ril-next-button ${styles.navButtons} ${styles.navButtonNext}`}

0 commit comments

Comments
 (0)