hart-estate-widget 0.0.54 → 0.0.55
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.
@@ -529,10 +529,11 @@ var PanoramaTab = function PanoramaTab(_ref4) {
|
|
529
529
|
|
530
530
|
rescaleMap();
|
531
531
|
var image = document.querySelector('.widget-tab__panorama-map img');
|
532
|
+
var offset = image.getBoundingClientRect();
|
532
533
|
var clientX = event.clientX,
|
533
534
|
clientY = event.clientY;
|
534
|
-
var x = (clientX -
|
535
|
-
var y = (clientY -
|
535
|
+
var x = (clientX - offset.left) / planScale.X;
|
536
|
+
var y = (clientY - offset.top) / planScale.Y;
|
536
537
|
var availablePanoramas = panoramas.filter(function (_ref9) {
|
537
538
|
var userData = _ref9.userData;
|
538
539
|
return (0, _geometric.pointInPolygon)([x, y], userData.points);
|