mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-25 19:13:54 +00:00
Upgrade Prettier
This commit is contained in:
parent
7920d122f7
commit
43d54e6504
3 changed files with 20 additions and 21 deletions
|
|
@ -41,7 +41,7 @@ const stepOffset = (text, step) => {
|
|||
const negativePixels = pixels => `-${pixels}px`;
|
||||
|
||||
// If text is wider than the marquee, it needs to loop
|
||||
const loopText = text => isLong(text) ? text + text : text;
|
||||
const loopText = text => (isLong(text) ? text + text : text);
|
||||
|
||||
import CharacterString from "./CharacterString";
|
||||
|
||||
|
|
@ -55,15 +55,12 @@ class Marquee extends React.Component {
|
|||
|
||||
componentDidMount() {
|
||||
const step = () => {
|
||||
setTimeout(
|
||||
() => {
|
||||
if (this.state.stepping) {
|
||||
this.props.dispatch({ type: STEP_MARQUEE });
|
||||
}
|
||||
step();
|
||||
},
|
||||
220
|
||||
);
|
||||
setTimeout(() => {
|
||||
if (this.state.stepping) {
|
||||
this.props.dispatch({ type: STEP_MARQUEE });
|
||||
}
|
||||
step();
|
||||
}, 220);
|
||||
};
|
||||
step();
|
||||
}
|
||||
|
|
@ -94,12 +91,9 @@ class Marquee extends React.Component {
|
|||
this.setState({ stepping: false });
|
||||
document.addEventListener("mouseup", () => {
|
||||
// TODO: Remove this listener
|
||||
setTimeout(
|
||||
() => {
|
||||
this.setState({ stepping: true });
|
||||
},
|
||||
1000
|
||||
);
|
||||
setTimeout(() => {
|
||||
this.setState({ stepping: true });
|
||||
}, 1000);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,9 +8,12 @@ import {
|
|||
SET_SCRUB_POSITION
|
||||
} from "../actionTypes";
|
||||
|
||||
const Position = (
|
||||
{ position, seekToPercentComplete, displayedPosition, setPosition }
|
||||
) => {
|
||||
const Position = ({
|
||||
position,
|
||||
seekToPercentComplete,
|
||||
displayedPosition,
|
||||
setPosition
|
||||
}) => {
|
||||
// In shade mode, the position slider shows up differently depending on if
|
||||
// it's near the start, middle or end of its progress
|
||||
let className = "";
|
||||
|
|
|
|||
|
|
@ -130,7 +130,8 @@ class WindowManager extends React.Component {
|
|||
{this.validChildren().map((child, i) => {
|
||||
const position = this.state[i];
|
||||
/* eslint-disable react/jsx-no-bind */
|
||||
return position &&
|
||||
return (
|
||||
position &&
|
||||
<div
|
||||
onMouseDown={e => this.handleMouseDown(i, e)}
|
||||
ref={this.getRef}
|
||||
|
|
@ -138,7 +139,8 @@ class WindowManager extends React.Component {
|
|||
key={i}
|
||||
>
|
||||
{child}
|
||||
</div>;
|
||||
</div>
|
||||
);
|
||||
/* eslint-enable react/jsx-no-bind */
|
||||
})}
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue