@guardian/interactive-component-library 0.1.0-alpha.47 → 0.1.0-alpha.49

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.
@@ -5936,7 +5936,7 @@
5936
5936
  get viewPort() {
5937
5937
  return this._viewport;
5938
5938
  }
5939
- get zoomLevel() {
5939
+ get zoomScale() {
5940
5940
  return this.view.transform.k;
5941
5941
  }
5942
5942
  get isTransitioning() {
@@ -5982,15 +5982,15 @@
5982
5982
  this.layers.splice(layerIndex, 1);
5983
5983
  }
5984
5984
  async zoomIn(options) {
5985
- return this.zoomTo(this.zoomLevel * 2, options);
5985
+ return this.zoomTo(this.zoomScale * 2, options);
5986
5986
  }
5987
5987
  async zoomOut(options) {
5988
- return this.zoomTo(this.zoomLevel * 0.5, options);
5988
+ return this.zoomTo(this.zoomScale * 0.5, options);
5989
5989
  }
5990
- async zoomTo(zoomLevel, options = {
5990
+ async zoomTo(zoomScale, options = {
5991
5991
  duration: 500
5992
5992
  }) {
5993
- return d3Selection.select(this._viewport).transition().duration(options.duration).call(this._zoomBehaviour.scaleTo, zoomLevel).end();
5993
+ return d3Selection.select(this._viewport).transition().duration(options.duration).call(this._zoomBehaviour.scaleTo, zoomScale).end();
5994
5994
  }
5995
5995
  zoomToFeature(feature, focalPoint, padding = {
5996
5996
  top: 40,
@@ -6340,6 +6340,7 @@
6340
6340
  const [zoomHelpText, setZoomHelpText] = hooks.useState("");
6341
6341
  const [showHelpText, setShowHelpText] = hooks.useState(false);
6342
6342
  hooks.useEffect(() => {
6343
+ var _a;
6343
6344
  const map2 = new Map$2({
6344
6345
  view: new View(config.view),
6345
6346
  target: targetRef.current
@@ -6350,7 +6351,12 @@
6350
6351
  if (ref)
6351
6352
  ref.current = map2;
6352
6353
  onLoad && onLoad(map2);
6353
- const zoomHelpText2 = navigator.userAgent.indexOf("Mac") !== -1 ? "Use ⌘ + scroll to zoom" : "Use Ctrl + scroll to zoom";
6354
+ let zoomHelpText2 = "";
6355
+ if (((_a = navigator.userAgentData) == null ? void 0 : _a.mobile) || navigator.userAgent.indexOf("Mobile") !== -1) {
6356
+ zoomHelpText2 = mobileHelpText;
6357
+ } else {
6358
+ zoomHelpText2 = navigator.userAgent.indexOf("Mac") !== -1 ? "Use ⌘ + scroll to zoom" : "Use Ctrl + scroll to zoom";
6359
+ }
6354
6360
  setZoomHelpText(zoomHelpText2);
6355
6361
  return () => {
6356
6362
  map2.destroy();
@@ -7785,10 +7791,13 @@
7785
7791
  children: jsxRuntime.jsx("div", {
7786
7792
  ref: tickerScrollRef,
7787
7793
  className: styles.tickerScroll,
7788
- children: childArray.map((child, index) => jsxRuntime.jsx("div", {
7789
- className: styles.tickerItem,
7790
- children: child
7791
- }, index))
7794
+ children: childArray.map((child, index) => {
7795
+ var _a;
7796
+ return jsxRuntime.jsx("div", {
7797
+ className: styles.tickerItem,
7798
+ children: child
7799
+ }, ((_a = child == null ? void 0 : child.props) == null ? void 0 : _a.id) ?? index);
7800
+ })
7792
7801
  })
7793
7802
  }), jsxRuntime.jsxs("div", {
7794
7803
  ref: controlsRef,