@guardian/interactive-component-library 0.8.5-alpha.7 → 0.8.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.
@@ -122,9 +122,14 @@ class View {
122
122
  * @returns {Extent} - The extent relative to the current viewport
123
123
  */
124
124
  projectExtent(extent) {
125
- const [minX, minY] = this.projection([extent.minX, extent.minY]);
126
- const [maxX, maxY] = this.projection([extent.maxX, extent.maxY]);
127
- return new Extent(minX, minY, maxX, maxY).scale(1 / this.pixelRatio);
125
+ const [x1, y1] = this.projection([extent.minX, extent.minY]);
126
+ const [x2, y2] = this.projection([extent.maxX, extent.maxY]);
127
+ return new Extent(
128
+ Math.min(x1, x2),
129
+ Math.min(y1, y2),
130
+ Math.max(x1, x2),
131
+ Math.max(y1, y2)
132
+ ).scale(1 / this.pixelRatio);
128
133
  }
129
134
  invert(point) {
130
135
  const { projection, pixelRatio, transform } = this.getState();
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@guardian/interactive-component-library",
3
3
  "private": false,
4
- "version": "0.8.5-alpha.7",
4
+ "version": "0.8.6",
5
5
  "packageManager": "pnpm@8.4.0",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "git+https://github.com/guardian/interactive-component-library.git"
8
+ "url": "https://github.com/guardian/interactive-component-library"
9
9
  },
10
10
  "type": "module",
11
11
  "files": [