mirror of
https://github.com/mastodon/mastodon.git
synced 2025-09-06 09:51:24 +00:00
Linting fixes
This commit is contained in:
parent
9e61e8cd42
commit
8f66a3a898
|
@ -47,12 +47,12 @@ class Item extends PureComponent {
|
||||||
|
|
||||||
handlePlay = (e) => {
|
handlePlay = (e) => {
|
||||||
e.target.play();
|
e.target.play();
|
||||||
}
|
};
|
||||||
|
|
||||||
handlePause = (e) => {
|
handlePause = (e) => {
|
||||||
e.target.pause();
|
e.target.pause();
|
||||||
e.target.currentTime = 0;
|
e.target.currentTime = 0;
|
||||||
}
|
};
|
||||||
|
|
||||||
handleMouseEnter = (e) => {
|
handleMouseEnter = (e) => {
|
||||||
if (this.hoverToPlay()) {
|
if (this.hoverToPlay()) {
|
||||||
|
@ -80,7 +80,7 @@ class Item extends PureComponent {
|
||||||
|
|
||||||
if (e.button === 0 && !(e.ctrlKey || e.metaKey)) {
|
if (e.button === 0 && !(e.ctrlKey || e.metaKey)) {
|
||||||
if (this.hoverToPlay()) {
|
if (this.hoverToPlay()) {
|
||||||
this.handlePause(e)
|
this.handlePause(e);
|
||||||
}
|
}
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
onClick(index);
|
onClick(index);
|
||||||
|
@ -90,7 +90,7 @@ class Item extends PureComponent {
|
||||||
};
|
};
|
||||||
|
|
||||||
handleKeyPress = (e) => {
|
handleKeyPress = (e) => {
|
||||||
const child = e.target.children[0]
|
const child = e.target.children[0];
|
||||||
if (e.code === "Space" || e.code === "Enter"){
|
if (e.code === "Space" || e.code === "Enter"){
|
||||||
this.keyPlay = !this.keyPlay;
|
this.keyPlay = !this.keyPlay;
|
||||||
if (this.keyPlay) {
|
if (this.keyPlay) {
|
||||||
|
@ -102,7 +102,7 @@ class Item extends PureComponent {
|
||||||
this.keyPlay = false;
|
this.keyPlay = false;
|
||||||
this.handlePause({target: child});
|
this.handlePause({target: child});
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
handleImageLoad = () => {
|
handleImageLoad = () => {
|
||||||
this.setState({ loaded: true });
|
this.setState({ loaded: true });
|
||||||
|
|
Loading…
Reference in New Issue
Block a user