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.
package/dist/components/Map.js
CHANGED
|
@@ -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,
|