@guardian/interactive-component-library 0.8.7 → 0.8.8

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.
@@ -48,22 +48,7 @@ export class View {
48
48
  };
49
49
  }, debug?: boolean);
50
50
  debug: boolean;
51
- projection: {
52
- (p: any): number[];
53
- invert(p: any): number[];
54
- stream(stream: any): any;
55
- postclip(_: any, ...args: any[]): any;
56
- clipExtent(_: any, ...args: any[]): any[][] | any;
57
- scale(_: any, ...args: any[]): number | any;
58
- translate(_: any, ...args: any[]): number[] | any;
59
- angle(_: any, ...args: any[]): number | any;
60
- reflectX(_: any, ...args: any[]): boolean | any;
61
- reflectY(_: any, ...args: any[]): boolean | any;
62
- fitExtent(extent: any, object: any): any;
63
- fitSize(size: any, object: any): any;
64
- fitWidth(width: any, object: any): any;
65
- fitHeight(height: any, object: any): any;
66
- };
51
+ projection: any;
67
52
  bounds: GeoBounds;
68
53
  extent: Extent;
69
54
  minZoom: number;
@@ -123,8 +108,8 @@ export class View {
123
108
  * @returns {Extent} - The extent relative to the current viewport
124
109
  */
125
110
  projectExtent(extent: Extent): Extent;
126
- invert(point: any): number[];
127
- invertBounds(bounds: any): number[][];
111
+ invert(point: any): any;
112
+ invertBounds(bounds: any): any[];
128
113
  getResolution(): number;
129
114
  getZoomLevel(): number;
130
115
  /**
@@ -145,22 +130,7 @@ export class View {
145
130
  getVisibleBounds(transform: ZoomTransform, projection: any): import('./util').GeoBounds;
146
131
  getState(): {
147
132
  transform: ZoomTransform;
148
- projection: {
149
- (p: any): number[];
150
- invert(p: any): number[];
151
- stream(stream: any): any;
152
- postclip(_: any, ...args: any[]): any;
153
- clipExtent(_: any, ...args: any[]): any[][] | any;
154
- scale(_: any, ...args: any[]): number | any;
155
- translate(_: any, ...args: any[]): number[] | any;
156
- angle(_: any, ...args: any[]): number | any;
157
- reflectX(_: any, ...args: any[]): boolean | any;
158
- reflectY(_: any, ...args: any[]): boolean | any;
159
- fitExtent(extent: any, object: any): any;
160
- fitSize(size: any, object: any): any;
161
- fitWidth(width: any, object: any): any;
162
- fitHeight(height: any, object: any): any;
163
- };
133
+ projection: any;
164
134
  zoomLevel: any;
165
135
  pixelRatio: number;
166
136
  padding: {
@@ -22,7 +22,7 @@ class View {
22
22
  }, debug = false) {
23
23
  this.debug = debug;
24
24
  projection.revision = 0;
25
- this.projection = projection;
25
+ this.projection = projection.copy ? projection.copy() : { ...projection };
26
26
  this.bounds = bounds && GeoBounds.convert(bounds);
27
27
  this.extent = Extent.convert(extent) || GeoBounds.convert(bounds).toExtent();
28
28
  this.minZoom = minZoom;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@guardian/interactive-component-library",
3
3
  "private": false,
4
- "version": "0.8.7",
4
+ "version": "0.8.8",
5
5
  "packageManager": "pnpm@8.4.0",
6
6
  "repository": {
7
7
  "type": "git",