Skip to content

Commit 47b6ef2

Browse files
committed
Fixed lint issue
1 parent 5c343af commit 47b6ef2

1 file changed

Lines changed: 16 additions & 15 deletions

File tree

web/client/epics/playback.js

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,10 @@ module.exports = {
129129
action$.ofType(PLAY).exhaustMap(() =>
130130
getAnimationFrames(getState)
131131
.map((frames) => setFrames(frames))
132-
.let(wrapStartStop(framesLoading(true), framesLoading(false)), e => Rx.Observable.of(
132+
.let(wrapStartStop(framesLoading(true), framesLoading(false)), () => Rx.Observable.of(
133133
error({
134134
title: "There was an error retriving animation",
135135
message: "Please contact the administrator"
136-
137136
}),
138137
stop()
139138
))
@@ -156,19 +155,21 @@ module.exports = {
156155
.map(() => currentFrameValueSelector(getState()))
157156
.map(t => t ? moveTime(t) : stop()),
158157
timeDimensionPlayback: (action$, { getState = () => { } } = {}) =>
159-
action$.ofType(SET_FRAMES).exhaustMap(() =>
160-
Rx.Observable.interval(frameDurationSelector(getState()) * 1000).startWith(0) // start immediately
161-
.let(pausable(
162-
action$
163-
.ofType(PLAY, PAUSE)
164-
.map(a => a.type === PLAY)
165-
))
166-
// pause is with loss, so the count of timer is not correct.
167-
// the following scan emit a for every event emitted effectively, with correct count
168-
// TODO: in case of loop, we can reset to 0 on load end.
169-
.map(() => setCurrentFrame(currentFrameSelector(getState()) + 1))
170-
.concat(Rx.Observable.of(stop()))
171-
.takeUntil(action$.ofType(STOP, LOCATION_CHANGE))
158+
action$.ofType(SET_FRAMES)
159+
.exhaustMap(() =>
160+
Rx.Observable.interval(frameDurationSelector(getState()) * 1000).startWith(0) // start immediately
161+
.let(pausable(
162+
action$
163+
.ofType(PLAY, PAUSE)
164+
.map(a => a.type === PLAY)
165+
))
166+
// pause is with loss, so the count of timer is not correct.
167+
// the following scan emit a for every event emitted effectively, with correct count
168+
// TODO: in case of loop, we can reset to 0 on load end.
169+
.map(() => setCurrentFrame(currentFrameSelector(getState()) + 1))
170+
.concat(Rx.Observable.of(stop()))
171+
.takeUntil(action$.ofType(STOP, LOCATION_CHANGE))
172+
172173
),
173174
/**
174175
* Synchronizes the fixed animation step toggle with guide layer on timeline

0 commit comments

Comments
 (0)