iticket-seatingplan-dev 1.1.6 → 1.1.7
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.
|
@@ -236,12 +236,12 @@ const SeatingPlan = _ref => {
|
|
|
236
236
|
paName: s.priceAgeName
|
|
237
237
|
})));
|
|
238
238
|
img.onload = () => {
|
|
239
|
+
setPosition([img.height * 0.005, img.width * 0.005]);
|
|
239
240
|
setHeight(img.height * 0.5);
|
|
240
241
|
setWidth(img.width * 0.5);
|
|
241
|
-
setPosition([img.height * 0.005, img.width * 0.005]);
|
|
242
242
|
setSeats(data);
|
|
243
243
|
};
|
|
244
|
-
map && map.target.setView([height * 0.015, width * 0.015],
|
|
244
|
+
map && area === areaId && map.target.setView([height * 0.015, width * 0.015], 6);
|
|
245
245
|
setIsReloading(false);
|
|
246
246
|
}).catch(error => {
|
|
247
247
|
console.log(error);
|
|
@@ -259,6 +259,7 @@ const SeatingPlan = _ref => {
|
|
|
259
259
|
if (!error && areaId !== area) {
|
|
260
260
|
setArea(areaId);
|
|
261
261
|
initialFetch();
|
|
262
|
+
setPosition(null);
|
|
262
263
|
}
|
|
263
264
|
}, [areaId]);
|
|
264
265
|
(0, _react.useEffect)(() => {
|
|
@@ -287,7 +288,7 @@ const SeatingPlan = _ref => {
|
|
|
287
288
|
}
|
|
288
289
|
}, error ? /*#__PURE__*/_react.default.createElement("div", {
|
|
289
290
|
className: "loading"
|
|
290
|
-
}, /*#__PURE__*/_react.default.createElement("h1", null, "OOPS!"), /*#__PURE__*/_react.default.createElement("div", null, error.response.data.message)) : position ? /*#__PURE__*/_react.default.createElement(_reactLeaflet.MapContainer, {
|
|
291
|
+
}, /*#__PURE__*/_react.default.createElement("h1", null, "OOPS!"), /*#__PURE__*/_react.default.createElement("div", null, error.response.data.message)) : position && area === areaId ? /*#__PURE__*/_react.default.createElement(_reactLeaflet.MapContainer, {
|
|
291
292
|
whenReady: setMap,
|
|
292
293
|
center: [height * 0.015, width * 0.015],
|
|
293
294
|
zoom: 6,
|
|
@@ -371,7 +372,7 @@ const SeatingPlan = _ref => {
|
|
|
371
372
|
}
|
|
372
373
|
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
373
374
|
title: "Re-centre Seating Plan",
|
|
374
|
-
onClick: () => map.target.setView([height * 0.015, width * 0.015],
|
|
375
|
+
onClick: () => map.target.setView([height * 0.015, width * 0.015], 6),
|
|
375
376
|
className: "leaflet-control-zoom-in",
|
|
376
377
|
style: {
|
|
377
378
|
border: 'none',
|