Commit a3babc7e authored by Evgeny Talagaev's avatar Evgeny Talagaev

Change map

parent 72acf3f0
/* eslint-disable */
import ready from 'Utils/documentReady.js';
import getScrollSize from 'Utils/getScrollSize.js';
import Swiper, { Navigation, Pagination, EffectFade, Autoplay, Thumbs } from 'swiper';
......@@ -6,7 +8,6 @@ import Accordion from 'accordion-js';
Swiper.use([Navigation, Pagination, EffectFade, Autoplay, Thumbs]);
ready(function() {
console.log('DOM героически построен!');
const body = document.querySelector('body');
// Добавление кастомного свойства с системной шириной скролла
......@@ -306,6 +307,8 @@ ready(function() {
const mapSvg = document.getElementById('map-svg');
if (mapSvg) {
if (screen.width < 768) return;
const {x: leftIndent, y: topIndent} = mapSvg.getBoundingClientRect();
const paths = mapSvg.querySelectorAll('path');
const pinsArea = document.getElementById('map-svg__pins');
......@@ -592,8 +595,6 @@ ready(function() {
screenSize = 'xl';
} else if (screen.width >= 768) {
screenSize = 'md';
} else {
}
pin.className = 'map-svg__pin';
......@@ -602,6 +603,7 @@ ready(function() {
left: ${correctionsPins[screenSize][area] ? x + correctionsPins[screenSize][area].left : x}px;
top: ${correctionsPins[screenSize][area] ? y + correctionsPins[screenSize][area].top : y}px;
`;
if (area) {
pin.dataset.area = area;
}
......
......@@ -567,6 +567,14 @@ block content
<path data-area="krym" d="M38.5102 500.558L44.0509 494.083L31.5675 477.685L38.9775 456.636L33.6592 452.253L29.0308 455.479L10.7618 443.019L8.44762 446.712L9.15969 461.509L2.21704 468.896L4.06396 479.064L16.0801 478.374L29.4981 495.24L38.5102 500.558Z" fill="white"/>
<path data-area="sevastopol" d="M6.5 473.5C5.3 474.3 3.16667 473.833 2.5 473.5L1.5 468.5L7.5 462.5C7.9 462.5 9.5 465.833 9.5 466.5C9.16667 466.667 8.5 468.7 8.5 469.5C8.5 470.5 8 470.5 7 470.5C6.2 470.5 7 471.5 7.5 472C7.66667 472.167 7.7 472.7 6.5 473.5Z" fill="white" stroke="#309364"/>
<path data-area="st-petersburg" d="M234.5 251.5C234.5 249.9 236.833 247.5 238 246.5L239 248L241 246L240.131 242.514L240.5 240C244.9 240.4 244.5 247.833 244 251.5C243.667 252.5 243.2 255 244 257C245 259.5 242 261 240 261C238 261 236 258.5 236 257C236 255.5 234.5 253.5 234.5 251.5Z" fill="white" stroke="#309364"/>
<path d="M34 451L29 454.5L26.5 444.5L19 436.5V432.5L17 428.5V426L19 425.5L21.5 429.5L22.5 428.5L20.5 422L21.5 420L23 420.5L26 430.5L29.5 432.5L30 431L26 426V424H27L30.5 425.5L38 433.5L42.5 430.5L45.5 432.5L49 428.5H52L55.5 435.5L58.5 440L57.5 443.5L55.5 446L56 449.5L53 452L52 456.5L46.5 460.5L47 462.5L45.5 466L40 467V460.5L38.5 459L39.5 456L34 451Z" fill="#309364" />
<path d="M83.5 462.5L86 465L83 471L84.5 477H78.5L76.5 481.5L73.5 483.5L64 477.5L60 472L52 470L45.5 466L47 462.5L46.5 460.5L52 456.5L53 452L56 449.5L55.5 446L57.5 443.5L58.5 440L64 444.5L67.5 450L70.5 448.5L75 442.5L78.5 443.5L80 450L84.5 452L86 456L83.5 462.5Z" fill="#309364" />
<path d="M94 491.5L90.5 495L86.5 494L82 488L79.5 486.5L76.5 485.5L73.5 483.5L76.5 481.5L78.5 477H84.5L83 471L86 465L89 462.5L91.5 463L92.5 466.5L95 465L100.5 457.5L103.5 456.5L108 460.5H115.5L120 462L121 464.5L118 468.5L118.5 471L114 475.5L111 480L108.5 493.5L94 491.5Z" fill="#309364" />
<path d="M142 473.5L134 458H127L121 464.5L118 468.5L118.5 471L114 475.5L111 480L108 494L114 502L121.5 499.5L126.5 490.5L130.5 490L134 485L141.5 485.5L142 473.5Z" fill="#309364" />
<path d="M127.41 458.7L134.24 458.75L142 473.29L141.58 485.4L133.94 485.17L130.81 489.86L126.6 490.33L121.62 499.05L114.26 501.93L108.76 493.69L112.06 480.29L114.95 475.85L119.44 471.23L118.95 468.45L121.33 465.31L127.41 458.7Z" fill="white" />
<path d="M111.06 480.07L107.92 493.34L93.8701 491.48L90.9901 494.35L86.9701 493.14L83.0001 487.5L79.5001 485.5L76.5001 484.5L75.0801 483.44L77.1101 481.85L78.9701 477.88L85.3501 477.64L83.7401 471.07L86.5101 465.59L89.0901 463.37L90.9701 463.7L92.0001 467.5L95.5001 465.5L100.92 458.24L103.18 457.41L107.66 461.2L115.25 461.29L119.36 462.61L120.4 465.02L118 468.36L118.49 471L114 475.5L111.06 480.07Z" fill="white" />
<path d="M85.4799 465.58L82.7999 470.96L84.2899 476.85L78.3899 477.02L76.3999 481.41L74.2199 483.02L64.6799 476.84L60.5099 471.19L52.1199 469.29L45.8599 465.36L47.1399 462.59L46.6799 460.59L52.1799 456.59L53.1199 452.09L56.1799 449.65L55.6499 446.08L57.5699 443.54L58.5199 441.01L63.3499 445.1L67.1499 451.08L70.8999 449.2L75.2699 443.44L77.8399 444.22L79.3399 450.42L84.0699 452.57L85.2299 456.06L82.6599 462.68L85.4799 465.58Z" fill="white" />
<path d="M49.3601 429.35L51.5701 429.3L54.8301 435.96L57.8101 440.31L56.8601 443.05L54.7101 445.76L55.1801 449.24L52.2801 451.56L51.3001 456.09L45.6801 460.09L46.1801 462.42L45.0301 465.13L40.7601 465.92L40.7701 460.04L39.1801 458.43L39.9601 455.77L33.6501 450.69L29.6701 453.42L27.4301 444.11L19.9701 436.14L19.9101 432.52L17.8101 428.42L17.8601 426.72L18.6601 426.55L21.3001 430.51L23.2401 428.63L21.1801 422.08L21.7301 421.02L22.5101 421.25L25.5401 431.26L29.7501 433.53L30.7601 431.1L26.8201 425.85L26.8801 424.86L30.2101 426.24L37.8901 434.39L42.4701 431.47L45.5801 433.64L49.3601 429.35Z" fill="white" />
</svg>
section.def-block.of-h
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment