svelteplot 0.4.2-pr-186.0 → 0.4.2-pr-186.1

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.
@@ -99,7 +99,7 @@ function invertScale(scale, position) {
99
99
  const domain = scale.fn.domain();
100
100
  const eachBand = scale.fn.step();
101
101
  const extent = range[1] - range[0];
102
- const posInRange = ((position - range[0]) / extent) * Math.abs(extent);
102
+ const posInRange = (position - range[0]) * Math.sign(extent);
103
103
  const index = Math.floor(posInRange / eachBand);
104
104
  return domain[index];
105
105
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svelteplot",
3
- "version": "0.4.2-pr-186.0",
3
+ "version": "0.4.2-pr-186.1",
4
4
  "license": "ISC",
5
5
  "author": {
6
6
  "name": "Gregor Aisch",