Skip to content

Commit

Permalink
Add linting to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
jbaiter committed Jul 17, 2020
1 parent 2d5fbe5 commit 6a8512f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ jobs:
- run: npm ci
- run: npm run build --if-present
- run: npm run test:coverage
- run: npm run lint
- uses: codecov/[email protected]
13 changes: 8 additions & 5 deletions src/components/MiradorTextOverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,18 @@ class MiradorTextOverlay extends Component {
viewer.addHandler('update-viewport', this.onUpdateViewport.bind(this));
viewer.addHandler('animation-finish', () => {
const { hideDuringAnimation } = this.state;
const newState = {};
if (!hideDuringAnimation) {
this.perfMon.stop();
if (this.perfMon.isPerformanceDegraded) {
this.setState({
hideDuringAnimation: true,
showPerformanceNotification: true,
});
newState.hideDuringAnimation = true;
newState.showPerformanceNotification = true;
}
}
this.setState({ animating: false });
this.setState({
...newState,
animating: false,
});
this.onUpdateViewport();
});
}
Expand Down Expand Up @@ -175,6 +177,7 @@ class MiradorTextOverlay extends Component {
onClose={closeNotification}
message={t('performanceDegradationDetected')}
action={(
// The 'dismiss' label comes from M3 itself
<IconButton size="small" aria-label={t('dismiss')} color="inherit" onClick={closeNotification}>
<CloseIcon fontSize="small" />
</IconButton>
Expand Down

0 comments on commit 6a8512f

Please sign in to comment.