@woosmap/ui 4.164.5 → 4.164.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@woosmap/ui",
3
- "version": "4.164.5",
3
+ "version": "4.164.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/WebGeoServices/ui.git"
@@ -14,22 +14,21 @@ class PricingSlider extends Component {
14
14
  return queries;
15
15
  }
16
16
  return pricing.reduce((amount, tier, index) => {
17
- previousPricingTier = index > 0 ? pricing[index - 1] : null;
18
-
19
- if (previousPricingTier !== null) {
20
- const valueToRemove = Math.min(tier[0] - previousPricingTier[0], q);
21
- if (valueToRemove > 0) {
22
- q -= valueToRemove;
23
- return amount + (valueToRemove / 1000) * tier[1] * coef;
24
- }
25
- } else {
26
- const valueToRemove = Math.min(tier[0], q);
17
+ previousPricingTier = index > 0 ? pricing[index - 1] : null;
18
+
19
+ if (previousPricingTier !== null) {
20
+ const valueToRemove = Math.min(tier[0] - previousPricingTier[0], q);
21
+ if (valueToRemove > 0) {
27
22
  q -= valueToRemove;
28
23
  return amount + (valueToRemove / 1000) * tier[1] * coef;
29
24
  }
30
- return amount;
31
- }, 0)
32
-
25
+ } else {
26
+ const valueToRemove = Math.min(tier[0], q);
27
+ q -= valueToRemove;
28
+ return amount + (valueToRemove / 1000) * tier[1] * coef;
29
+ }
30
+ return Math.floor(amount);
31
+ }, 0);
33
32
  };
34
33
 
35
34
  computeQueries = (valueNow) => {
@@ -171,6 +170,7 @@ class PricingSlider extends Component {
171
170
  renderMark={this.renderMarks}
172
171
  pearling
173
172
  min={0}
173
+ step={1000}
174
174
  onChange={(_queries) => {
175
175
  this.onChange(_queries);
176
176
  }}