iticket-seatingplan-dev 1.4.2 → 1.4.3

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.
@@ -267,7 +267,6 @@ function Map(_ref) {
267
267
  className: "priceage",
268
268
  onClick: () => {
269
269
  s.loading = true;
270
- map.closePopup();
271
270
  addTicketToCart(s, price);
272
271
  }
273
272
  }, /*#__PURE__*/_react.default.createElement("p", {
@@ -46,8 +46,14 @@ const SeatingPlan = _ref => {
46
46
  const [bounds, setBounds] = (0, _react.useState)(null);
47
47
  const [isFullScreen, setIsFullScreen] = (0, _react.useState)(false);
48
48
  const [mounted, setMounted] = _react.default.useState(false);
49
+ const mapRef = (0, _react.useRef)(null);
50
+ const setMap = map => {
51
+ mapRef.current = map;
52
+ };
49
53
  (0, _react.useLayoutEffect)(() => setMounted(true), []);
50
54
  const addTicketToCart = (s, priceage, cs) => {
55
+ var _mapRef$current, _mapRef$current$targe;
56
+ (_mapRef$current = mapRef.current) === null || _mapRef$current === void 0 ? void 0 : (_mapRef$current$targe = _mapRef$current.target) === null || _mapRef$current$targe === void 0 ? void 0 : _mapRef$current$targe.closePopup();
51
57
  setProcessing(true);
52
58
  fetch("".concat(baseUrl, "/legacy/").concat(countryCode, "/shop/events/").concat(eventId, "/").concat(eventVenueId, "/showings/").concat(showingId, "/tickets/allocated/").concat(areaId), {
53
59
  method: "POST",
@@ -353,7 +359,8 @@ const SeatingPlan = _ref => {
353
359
  zoom: undefined,
354
360
  zoomControl: true,
355
361
  scrollWheelZoom: true,
356
- bounds: bounds
362
+ bounds: bounds,
363
+ whenReady: setMap
357
364
  }, /*#__PURE__*/_react.default.createElement(_Map.default, {
358
365
  seats: seats,
359
366
  height: height,
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "iticket-seatingplan-dev",
3
3
  "description": "Seating plan with FLEXi pricing",
4
4
  "author": "gedwyne",
5
- "version": "1.4.2",
5
+ "version": "1.4.3",
6
6
  "private": false,
7
7
  "keywords": [
8
8
  "iticket",