iticket-seatingplan-dev 1.4.2 → 1.4.4
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
|
@@ -137,7 +137,7 @@ function Map(_ref) {
|
|
|
137
137
|
})))), /*#__PURE__*/_react.default.createElement(_reactLeafletCustomControl.default, {
|
|
138
138
|
position: "topleft"
|
|
139
139
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
140
|
-
className: "extra-controls"
|
|
140
|
+
className: "extra-controls full-screen-control"
|
|
141
141
|
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
142
142
|
title: isFullScreen ? "Collapse Seating Plan" : "Expand Seating Plan",
|
|
143
143
|
onClick: () => {
|
|
@@ -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,
|
|
@@ -612,6 +612,11 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|
|
612
612
|
display: flex;
|
|
613
613
|
}
|
|
614
614
|
|
|
615
|
+
@media screen and (max-width: 768px) {
|
|
616
|
+
.full-screen-control {
|
|
617
|
+
display: none;
|
|
618
|
+
}
|
|
619
|
+
}
|
|
615
620
|
/* layers control */
|
|
616
621
|
|
|
617
622
|
.leaflet-control-layers {
|
|
@@ -943,7 +948,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|
|
943
948
|
.seating-plan-backdrop.full-screen {
|
|
944
949
|
pointer-events: auto;
|
|
945
950
|
background-color: rgba(0, 0, 0, 0.4);
|
|
946
|
-
z-index:
|
|
951
|
+
z-index: 899;
|
|
947
952
|
}
|
|
948
953
|
|
|
949
954
|
.seating-plan-container.full-screen {
|
|
@@ -953,7 +958,7 @@ svg.leaflet-image-layer.leaflet-interactive path {
|
|
|
953
958
|
height: 90%;
|
|
954
959
|
width: 80%;
|
|
955
960
|
margin: 5vh 10vw;
|
|
956
|
-
z-index:
|
|
961
|
+
z-index: 900;
|
|
957
962
|
}
|
|
958
963
|
|
|
959
964
|
@media screen and (max-width: 1024px) {
|