react-component / slider

@@ -106,7 +106,7 @@
Loading
106 106
      const { draggableTrack, vertical: isVertical } = this.props;
107 107
      const { bounds } = this.state;
108 108
109 -
      const value = this.positionGetValue(p) || [];
109 +
      const value = draggableTrack && this.positionGetValue ? this.positionGetValue(p) || [] : [];
110 110
111 111
      const inPoint = utils.isEventFromHandle(e, this.handlesRefs);
112 112
      this.inTrack =
@@ -119,8 +119,6 @@
Loading
119 119
          })
120 120
          .some((c) => !c);
121 121
122 -
      const handlePosition = utils.getHandleCenterPosition(isVertical, e.target);
123 -
124 122
      if (this.inTrack) {
125 123
        this.dragOffset = p;
126 124
        this.startBounds = [...bounds];
@@ -128,6 +126,7 @@
Loading
128 126
        if (!inPoint) {
129 127
          this.dragOffset = 0;
130 128
        } else {
129 +
          const handlePosition = utils.getHandleCenterPosition(isVertical, e.target);
131 130
          this.dragOffset = p - handlePosition;
132 131
          p = handlePosition;
133 132
        }

@@ -62,6 +62,10 @@
Loading
62 62
    return 0;
63 63
  }
64 64
65 +
  positionGetValue = (position): number[] => {
66 +
    return [];
67 +
  };
68 +
65 69
  calcOffset(value: number) {
66 70
    return 0;
67 71
  }
@@ -246,7 +250,7 @@
Loading
246 250
      ariaLabelledBy: ariaLabelledByForHandle,
247 251
      ariaValueTextFormatter: ariaValueTextFormatterForHandle,
248 252
      style: handleStyle[0] || handleStyle,
249 -
      ref: h => this.saveHandle(0, h),
253 +
      ref: (h) => this.saveHandle(0, h),
250 254
    });
251 255
252 256
    const trackOffset = startPoint !== undefined ? this.calcOffset(startPoint) : 0;
Files Coverage
src 85.13%
Project Totals (11 files) 85.13%

No yaml found.

Create your codecov.yml to customize your Codecov experience

Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading