+
+ {/* custo color is live */}
+
+
+
- onDragEnd = () => {
- const { live, liveTimeTravel } = this.props;
- if (live && !liveTimeTravel) return;
+ {skip &&
+ skipIntervals.map((interval) => (
+
+ ))}
+
- if (this.wasPlaying) {
- this.props.togglePlay();
- }
- };
-
- onDrag = (offset) => {
- const { endTime, live, liveTimeTravel } = this.props;
- if (live && !liveTimeTravel) return;
-
- const p = (offset.x - BOUNDRY) / this.progressRef.current.offsetWidth;
- const time = Math.max(Math.round(p * endTime), 0);
- deboucneJump(time);
- this.hideTimeTooltip();
- if (this.props.playing) {
- this.wasPlaying = true;
- this.props.pause();
- }
- };
-
- getLiveTime = (e) => {
- const { startedAt } = this.props;
- const duration = new Date().getTime() - startedAt
- const p = e.nativeEvent.offsetX / e.target.offsetWidth;
- const time = Math.max(Math.round(p * duration), 0);
-
- return [time, duration];
- };
-
- showTimeTooltip = (e) => {
- if (e.target !== this.progressRef.current && e.target !== this.timelineRef.current) {
- return this.props.tooltipVisible && this.hideTimeTooltip();
- }
-
- const { live } = this.props;
- let timeLineTooltip;
-
- if (live) {
- const [time, duration] = this.getLiveTime(e);
- timeLineTooltip = {
- time: (duration - time),
- offset: e.nativeEvent.offsetX,
- isVisible: true,
- };
- } else {
- const time = this.getTime(e);
- timeLineTooltip = {
- time: time,
- offset: e.nativeEvent.offsetX,
- isVisible: true,
- }
- }
-
- debounceTooltipChange(timeLineTooltip);
- };
-
- hideTimeTooltip = () => {
- const timeLineTooltip = { isVisible: false };
- debounceTooltipChange(timeLineTooltip);
- };
-
- render() {
- const {
- events,
- skip,
- skipIntervals,
- disabled,
- endTime,
- live,
- } = this.props;
-
- const scale = 100 / endTime;
-
- return (
-
-
-
- {/* custo color is live */}
-
-
-
-
- {skip &&
- skipIntervals.map((interval) => (
-
- ))}
-
-
- {events.map((e) => (
-
- ))}
- {/* {issues.map((iss) => (
-
-
- {iss.name}
-
- }
- >
-
-
-
- ))}
- {events
- .filter((e) => e.type === TYPES.CLICKRAGE)
- .map((e) => (
-
-
- {'Click Rage'}
-
- }
- >
-
-
-
- ))}
- {typeof clickRageTime === 'number' && (
-
-
- {'Click Rage'}
-
- }
- >
-
-
-
- )}
- {exceptionsList.map((e) => (
-
- }
- >
-