Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
375 lines (362 sloc) 20.3 KB
import React from 'react'
import {connect} from 'react-redux'
const rooms = [
{id: 1, cx: 13.88, cy: 19.58},
{id: 2, cx: 55.39, cy: 19.58},
{id: 3, cx: 99.7, cy: 19.58},
{id: 7, cx: 133.87, cy: 19.58},
{id: 11, cx: 149.89, cy: 53.75},
{id: 10, cx: 209.54, cy: 53.75},
{id: 8, cx: 403.35, cy: 49.09},
{id: 60, cx: 464.63, cy: 91.75},
{id: 61, cx: 504.93, cy: 91.75},
{id: 62, cx: 530.72, cy: 74.04},
{id: 59, cx: 442.46, cy: 123.23},
{id: 12, cx: 489.61, cy: 185.23},
{id: 9, cx: 614.9, cy: 265.4},
{id: 75, cx: 735.49, cy: 265.4},
{id: 104, cx: 864.84, cy: 265.4},
{id: 87, cx: 830.76, cy: 346.51},
{id: 88, cx: 830.76, cy: 417.7},
{id: 89, cx: 898.47, cy: 417.7},
{id: 90, cx: 961, cy: 417.7},
{id: 92, cx: 1021.77, cy: 417.7},
{id: 93, cx: 1090.98, cy: 417.7},
{id: 94, cx: 1090.98, cy: 383.17},
{id: 95, cx: 1082.93, cy: 309.21},
{id: 96, cx: 1049.67, cy: 246.22},
{id: 97, cx: 1001.31, cy: 221.7},
{id: 98, cx: 960.49, cy: 221.7},
{id: 99, cx: 917.25, cy: 232.78},
{id: 101, cx: 917.25, cy: 271.36},
{id: 100, cx: 895.53, cy: 232.71},
{id: 102, cx: 875.02, cy: 232.71},
{id: 103, cx: 855.18, cy: 232.71},
{id: 91, cx: 961, cy: 383.91},
{id: 85, cx: 830.76, cy: 231.53},
{id: 86, cx: 821.76, cy: 197},
{id: 106, cx: 832, cy: 133.81},
{id: 107, cx: 855.18, cy: 56.66},
{id: 108, cx: 817.84, cy: 47.74},
{id: 105, cx: 889.03, cy: 197},
{id: 79, cx: 753.53, cy: 218.78},
{id: 84, cx: 780.02, cy: 183.8},
{id: 80, cx: 735.45, cy: 133.81},
{id: 81, cx: 755.18, cy: 126.7},
{id: 82, cx: 755.18, cy: 140.19},
{id: 83, cx: 771.57, cy: 133.81},
{id: 76, cx: 699.41, cy: 342},
{id: 77, cx: 771.57, cy: 342},
{id: 78, cx: 735.49, cy: 342},
{id: 65, cx: 489.61, cy: 306.29},
{id: 66, cx: 489.61, cy: 403.17},
{id: 67, cx: 522.56, cy: 403.17},
{id: 69, cx: 544.21, cy: 389.59},
{id: 68, cx: 573.82, cy: 389.59},
{id: 72, cx: 538.13, cy: 462.01},
{id: 70, cx: 467.55, cy: 436.27},
{id: 71, cx: 449.04, cy: 501.71},
{id: 74, cx: 504.93, cy: 487.56},
{id: 73, cx: 531.62, cy: 511.82},
{id: 64, cx: 525.48, cy: 139.1},
{id: 63, cx: 519.64, cy: 109.98},
{id: 111, cx: 348.24, cy: 113},
{id: 112, cx: 289.47, cy: 113},
{id: 13, cx: 149.89, cy: 83.85},
{id: 14, cx: 149.89, cy: 109.11},
{id: 16, cx: 141.91, cy: 216.03},
{id: 15, cx: 117.47, cy: 267.55},
{id: 17, cx: 151.8, cy: 299.73},
{id: 18, cx: 151.8, cy: 322.35},
{id: 19, cx: 151.8, cy: 336.59},
{id: 20, cx: 151.8, cy: 358.51},
{id: 21, cx: 141.91, cy: 380.29},
{id: 24, cx: 82.36, cy: 400.94},
{id: 25, cx: 82.36, cy: 416.12},
{id: 23, cx: 102.41, cy: 398.02},
{id: 22, cx: 117.39, cy: 406.78},
{id: 58, cx: 135.73, cy: 398.12},
{id: 57, cx: 161.05, cy: 398.02},
{id: 110, cx: 184.5, cy: 396.61},
{id: 56, cx: 184.5, cy: 433.35},
{id: 55, cx: 197.74, cy: 406.78},
{id: 54, cx: 197.74, cy: 435.4},
{id: 53, cx: 197.74, cy: 458.62},
{id: 52, cx: 184.5, cy: 480.19},
{id: 43, cx: 143.68, cy: 464.94},
{id: 42, cx: 117.27, cy: 464.94},
{id: 39, cx: 117.27, cy: 499.59},
{id: 38, cx: 104.49, cy: 520.32},
{id: 37, cx: 88.56, cy: 520.32},
{id: 36, cx: 71.44, cy: 520.32},
{id: 35, cx: 54.33, cy: 520.32},
{id: 32, cx: 31.39, cy: 508.39},
{id: 31, cx: 9.38, cy: 508.39},
{id: 30, cx: 14.07, cy: 475.97},
{id: 29, cx: 14.07, cy: 446.91},
{id: 28, cx: 14.07, cy: 427.51},
{id: 27, cx: 47.78, cy: 427.51},
{id: 26, cx: 67.87, cy: 427.51},
{id: 109, cx: 67.87, cy: 452.64},
{id: 34, cx: 62.88, cy: 497.78},
{id: 33, cx: 67.87, cy: 475.97},
{id: 40, cx: 84.27, cy: 475.97},
{id: 41, cx: 82.36, cy: 447.94},
{id: 45, cx: 136.94, cy: 520.32},
{id: 44, cx: 143.6, cy: 478.89},
{id: 46, cx: 190.42, cy: 502.22},
{id: 48, cx: 218.23, cy: 480.19},
{id: 51, cx: 213.48, cy: 498.35},
{id: 50, cx: 226.31, cy: 498.35},
{id: 49, cx: 244.03, cy: 480.19},
{id: 47, cx: 241.11, cy: 523.73},
{id: 4, cx: 13.96, cy: 52.86},
{id: 5, cx: 13.96, cy: 80.9},
{id: 10, cx: 13.96, cy: 102.47}
]
const connection = [
{to: 6, from: 5, d: "M13.96 80.9v21.57"},
{to: 5, from: 4, d: "M13.96 52.86V80.9"},
{to: 4, from: 1, d: "M13.96 19.58v33.28"},
{to: 1, from: 2, d: "M13.96 19.58h41.43"},
{to: 2, from: 3, d: "M55.39 19.58H99.7"},
{to: 3, from: 7, d: "M99.7 19.58h34.17"},
{to: 7, from: 11, d: "M133.87 19.58v34.17h16.02"},
{to: 11, from: 10, d: "M149.46 53.75h60.08"},
{to: 11, from: 13, d: "M149.89 53.75v30.1"},
{to: 13, from: 14, d: "M149.89 83.85v25.26"},
{to: 14, from: 15, d: "M149.89 109.11h-32.5v158.33"},
{to: 78, from: 76, d: "M699.91 340.39h36.08"},
{to: 78, from: 77, d: "M735.99 340.39h36.08"},
{to: 15, from: 16, d: "M117.86 267.56h33.94v-38.03h-9.89v-13.5"},
{to: 16, from: 17, d: "M141.91 216.03v13.5h9.89v70.2"},
{to: 17, from: 18, d: "M151.8 322.35v-22.62"},
{to: 18, from: 19, d: "M151.8 336.59v-14.24"},
{to: 19, from: 20, d: "M151.8 358.51v-21.92"},
{to: 15, from: 21, d: "M117.39 267.56v112.73h24.52"},
{to: 20, from: 21, d: "M151.8 358.51v21.78h-9.89"},
{to: 15, from: 22, d: "M117.39 267.82v138.97"},
{to: 15, from: 23, d: "M117.39 267.82v130.2h-14.98"},
{to: 15, from: 58, d: "M117.39 267.82v130.2h18.34"},
{to: 22, from: 58, d: "M117.39 406.79v-8.77h18.34"},
{to: 23, from: 58, d: "M135.73 398.02h-33.32"},
{to: 58, from: 57, d: "M161.05 398.02h-25.32"},
{to: 57, from: 110, d: "M161.05 398.02h14.71v-1.41h8.74"},
{to: 22, from: 23, d: "M117.39 406.77V398l-14.98.02"},
{to: 110, from: 55, d: "M197.74 406.79v-10.18H184.5"},
{to: 55, from: 54, d: "M197.74 435.4v-28.62"},
{to: 110, from: 56, d: "M184.5 433.35v-36.74"},
{to: 54, from: 53, d: "M197.74 458.62V435.4"},
{to: 56, from: 52, d: "M184.5 480.19v-46.84"},
{to: 52, from: 46, d: "M190.42 502.33v-22.14h-5.92"},
{to: 52, from: 48, d: "M218.23 480.19H184.5"},
{to: 46, from: 48, d: "M190.42 502.33v-22.14h27.81"},
{to: 48, from: 49, d: "M244.03 480.19h-25.8"},
{to: 51, from: 48, d: "M213.48 498.35v-9.67h4.75v-8.49"},
{to: 51, from: 50, d: "M226.31 498.35h-12.83"},
{to: 50, from: 49, d: "M226.31 498.35h17.72v-18.16"},
{to: 51, from: 47, d: "M241.11 523.73h-27.63v-25.38"},
{to: 52, from: 43, d: "M143.68 464.94h28.56v15.25h12.26"},
{to: 44, from: 43, d: "M143.6 478.89l.08-13.95"},
{to: 42, from: 43, d: "M117.27 464.94h26.41"},
{to: 42, from: 39, d: "M117.27 499.59v-34.65"},
{to: 39, from: 38, d: "M104.49 520.32v-20.73h12.78"},
{to: 45, from: 38, d: "M136.94 520.32h-32.45"},
{to: 38, from: 37, d: "M88.56 520.32h15.93"},
{to: 37, from: 36, d: "M71.44 520.32h17.12"},
{to: 36, from: 35, d: "M54.33 520.32h17.11"},
{to: 35, from: 32, d: "M31.39 508.38h22.94v11.94"},
{to: 32, from: 31, d: "M9.38 508.39h22.01"},
{to: 31, from: 30, d: "M14.07 475.97v19.89H9.38v12.52"},
{to: 30, from: 29, d: "M14.07 446.91v29.06"},
{to: 29, from: 28, d: "M14.07 427.51v19.4"},
{to: 28, from: 27, d: "M47.78 427.51H14.07"},
{to: 27, from: 26, d: "M67.87 427.51H47.78"},
{to: 26, from: 109, d: "M67.87 452.64v-25.13"},
{to: 109, from: 33, d: "M67.87 475.97v-23.33"},
{to: 33, from: 34, d: "M62.88 497.79v-21.82h4.99"},
{to: 34, from: 40, d: "M84.27 475.97v21.82H62.88"},
{to: 40, from: 41, d: "M82.36 447.94v19.92h1.91v8.11"},
{to: 41, from: 26, d: "M67.87 427.51h14.49v20.43"},
{to: 25, from: 26, d: "M82.36 416.12v11.39H67.87"},
{to: 41, from: 25, d: "M82.36 447.94v-31.82"},
{to: 25, from: 24, d: "M82.36 400.94v15.18"},
{to: 24, from: 23, d: "M102.41 398H82.36v2.94"},
{to: 10, from: 8, d: "M403.35 49.09h-84.36v26.46h-67.44v-21.8h-42.02"},
{to: 10, from: 112, d: "M289.46 113h29.53V75.55h-67.44v-21.8h-42.02"},
{to: 10, from: 111, d: "M348.24 113h-29.25V75.55h-67.44v-21.8h-42.02"},
{to: 8, from: 61, d: "M504.93 91.75V49.09H403.35"},
{to: 8, from: 12, d: "M489.61 185.23V49.09h-86.26"},
{to: 8, from: 59, d: "M442.46 123.23h47.15V49.09h-86.26"},
{to: 8, from: 60, d: "M464.63 91.75v18.23h24.98V49.09h-86.26"},
{to: 8, from: 64, d: "M525.48 139.1h-35.87V49.09h-86.26"},
{to: 61, from: 63, d: "M519.64 109.98V91.75h-14.71"},
{to: 62, from: 61, d: "M530.72 74.04v17.71h-25.79"},
{to: 12, from: 9, d: "M614.9 265.4H489.61v-80.17"},
{to: 65, from: 9, d: "M489.61 306.29V265.4H614.9"},
{to: 65, from: 66, d: "M489.61 403.17v-96.88"},
{to: 66, from: 67, d: "M522.56 403.17h-32.95"},
{to: 66, from: 70, d: "M467.55 436.27V395.4h22.06v7.77"},
{to: 69, from: 67, d: "M544.21 389.59v13.58h-21.65"},
{to: 69, from: 68, d: "M573.82 389.59v-14.03h-29.61v14.03"},
{to: 68, from: 67, d: "M522.56 403.17h51.26v-13.58"},
{to: 70, from: 71, d: "M467.55 436.27v65.44h-18.51"},
{to: 70, from: 74, d: "M504.93 487.56h-37.38v-51.29"},
{to: 71, from: 74, d: "M449.04 501.71h18.51v-14.15h37.38"},
{to: 72, from: 74, d: "M538.13 462.01v25.55h-33.2"},
{to: 73, from: 74, d: "M531.62 511.82v-24.26h-26.69"},
{to: 73, from: 72, d: "M538.13 462.01v25.55h-6.51v24.26"},
{to: 9, from: 75, d: "M735.49 265.4H614.9"},
{to: 75, from: 77, d: "M771.57 342v-76.6h-36.08"},
{to: 77, from: 76, d: "M699.41 342v70.94h72.16V342"},
{to: 76, from: 75, d: "M699.41 342v-76.6h36.08"},
{to: 75, from: 104, d: "M735.49 265.4h129.35"},
{to: 87, from: 75, d: "M830.76 346.51V265.4h-95.27"},
{to: 87, from: 104, d: "M830.76 346.51V265.4h34.08"},
{to: 87, from: 85, d: "M830.76 346.51V231.53"},
{to: 87, from: 88, d: "M830.76 417.7v-71.19"},
{to: 88, from: 89, d: "M898.47 417.7h-67.71"},
{to: 89, from: 90, d: "M961 417.7h-62.53"},
{to: 91, from: 90, d: "M961 383.91v33.79"},
{to: 90, from: 92, d: "M1021.77 417.7H961"},
{to: 92, from: 93, d: "M1090.98 417.7h-69.21"},
{to: 94, from: 93, d: "M1090.98 383.17v34.53"},
{to: 95, from: 94, d: "M1082.93 309.21v74.69h8.05"},
{to: 95, from: 96, d: "M1049.67 246.22h33.26v62.99"},
{to: 96, from: 97, d: "M1001.31 221.7v24.52h48.36"},
{to: 96, from: 98, d: "M960.49 221.7v14.01h40.82v10.51h48.36"},
{to: 98, from: 97, d: "M1001.31 221.7v14.01h-40.82v-12.26"},
{to: 98, from: 105, d: "M889.03 197h71.46v24.7"},
{to: 98, from: 99, d: "M917.25 232.78h25.67V221.7h17.57"},
{to: 101, from: 99, d: "M917.25 271.36v-38.58"},
{to: 101, from: 100, d: "M895.53 232.71v38.65h21.72"},
{to: 100, from: 99, d: "M895.53 232.71h21.72"},
{to: 102, from: 100, d: "M875.02 232.71h20.51"},
{to: 103, from: 102, d: "M855.18 232.71h19.84"},
{to: 86, from: 105, d: "M821.76 197h67.27"},
{to: 86, from: 85, d: "M821.76 197h-7.24v34.53h16.24"},
{to: 106, from: 86, d: "M832 133.81v40.62h-2.92V197h-7.32"},
{to: 107, from: 106, d: "M855.18 56.66h-12.52v77.1H832"},
{to: 108, from: 107, d: "M817.84 47.74h37.34v8.92"},
{to: 84, from: 79, d: "M780.01 183.81h-26.48v34.97"},
{to: 84, from: 83, d: "M771.57 133.81v50h8.44"},
{to: 84, from: 80, d: "M780.01 183.81h-44.52v-50"},
{to: 81, from: 80, d: "M755.18 126.7 735.49 126.7 735.49 133.81"},
{to: 82, from: 80, d: "M755.18 140.19h-19.69v-6.38"},
{to: 78, from: 79, d: "M735.49 342v-64.3M735.49 251.65v-32.87h18.04"},
{to: 12, from: 60, d: "M490.11 183.62v-75.25h-24.98V90.14"},
{to: 12, from: 65, d: "M490.11 183.62v121.06"},
{to: 12, from: 64, d: "M490.11 183.62v-46.13h35.87"},
{to: 75, from: 85, d: "M735.99 263.79h95.27v-33.87"},
{to: 75, from: 85, d: "M735.99 263.79h95.27v-33.87"},
{to: 104, from: 85, d: "M865.34 263.79h-34.08v-33.87"},
{to: 58, from: 21, d: "M136.23 396.5h-18.34v-17.82h24.52"},
{to: 111, from: 8, d: "M348.74 111.39h-29.25V47.48h84.36"},
]
class Map extends React.PureComponent {
constructor(props) {
super(props)
this.state = {
minZoom: 2,
maxZoom: .5,
zoom: 2,
step: .5,
width: 1124,
height: 543
}
}
zoom() {
this.setState({
zoom: this.state.zoom - this.state.step
})
}
unZoom() {
this.setState({
zoom: this.state.zoom + this.state.step
})
}
render() {
const roomsList = [],
roomListKeys = {},
routeList = [],
routeListKeys = {}
this.props.route.map(room => {
let roomFind = rooms.filter(item => {
return room.id === item.id
})
if (roomFind !== 0) {
roomFind = roomFind[0]
if (room.target && !(roomFind.id in roomListKeys)) {
roomsList.push(roomFind)
roomListKeys[roomFind.id] = true
}
} else {
console.error(`Не найдена комната ${room.id}`)
}
})
this.props.route.map((room, key) => {
if (key < this.props.route.length - 1) {
let to = room.id,
from = this.props.route[key + 1].id,
id = `${to}/${from}`,
route = connection.filter(connect => {
return (connect.to === to && connect.from === from || connect.from === to && connect.to === from) && to !== from
})
if (route.length !== 0) {
if (!(id in routeListKeys)) {
route = route[0]
routeList.push({id, d: route.d})
routeListKeys[id] = true
}
} else {
console.log(route.length)
console.error(`Не найдена связь ${to} ${from}`)
}
}
})
return <div className={`map${this.state.zoom === this.state.minZoom ? ' map_min' : ''}${this.props.big ? ' map_big' : ''}`}>
<div className="map__actions">
<button className="map__button map__button_zoom button" onClick={this.zoom.bind(this)} disabled={this.state.zoom === this.state.maxZoom} />
<button className="map__button map__button_unzoom button" onClick={this.unZoom.bind(this)} disabled={this.state.zoom === this.state.minZoom} />
</div>
<div className="map__area">
<div className="map__image" style={{width: `${this.state.width / this.state.zoom}px`, height: `${this.state.height / this.state.zoom}px`}}>
<div className="map__inner">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1124 543">
<g className="map__section_1">
<path d="M538.1 44.9h-14.75V26.73h-27.44V6.48h132.18v5.67h17.9v20.52H670v50.21h-42.35V44.9H538.1v81.2h88.24V97.28H670v44.97h-20.52l.08 22.18-111.41-.35-.05-119.18M356.49 473.58v67.02h69.41v-55.45h32.03v-93.38l-32.03-1.17v82.98h-69.41M495.53 334.29v57.77h40.87l.81-90.43h13.2V271.5h-37.58v62.79h-17.3M618.99 413.74v22.34h47.48v-43.49h-20.35v-22.34h-53.6v43.49h26.47M957.06 374.18v-12.91h27.12v-65.82h-48.65v78.73h21.53M991.26 210.01h111.14l1.75 158.89h17.11V92.59h-61.04v92.95l-68.96.81v23.66M1033.49 69.85h27.53v7.18h60.24V6.82H837.92v31.47h33.1v36.74h12.07V57.88h150.4v11.97M991.26 283.28v-29.7h-40.74v28.85l40.74.85M571.25 477.57v20.52h-30.91v31.74h45.14v-8.38h63.83v-20.34h19.15v-49.87H617.8v26.33h-46.55M448.18 99.64V83.85l-99.37-.1-.3 10.03h80.98v5.86h18.69M474.58 498.09h47.22v31.74h-47.22z"/>
<path d="M538.15 233.5l.26-86.77h-25.36l-.57 84.8.35 28.97h37.58v-27h-12.26M474.97 189.13h-25.93v84.8h26.01M768.66 12.15V5.17h-70.72v4.8h-9.61v242.42h34.36V120.31l57.32-.74V12.15h-11.35M276.08 67.92l-.7-25.81h15.81l-.58-20.79-59.86.58v22.24h28.11v23.78h17.22M157.02 142.46h45.48v-20.55h-77.13v69.05h31.65v-48.5M178.42 460.22v-39.16H87.19v39.16h91.23M153.82 484.64h22.34v31.12h-22.34zM195.97 42.11V22.24l-40.26.39V6.04h-13.8v28.2h15.46v7.87h38.6M242.69 81.91V61.38h-36.74v20.53h-32.49V61.38h-16.09v31.86l132.09.54V81.91h-46.77M50.02 111.69h16.69v279.12h43.72V94.58H55.39v-33.2h71.09V41.26H38.96v51.98h11.06v18.45"/>
</g>
<g className="map__section_2">
<path d="M780.01 197.11v56.25h18.11v-67.02h9.57V75.83h-9.17V6.82h322.74v70.21h-60.24v-7.18h-27.53V57.88h-150.4v17.15h-28.32v110.51h205.45V92.59h61.04v355.06h-61.04v-7.58H861.95v9.97h-61.44v-62.63h5.99V284.48h-26.49v138.03h-91.6V282.88h-13.96v8.38h-7.19v10.37H537.21v68.62h108.91v22.34h20.35v43.49h-47.48v-22.34H477.37v63.83h46.27v-43.09h31.12v43.09h63.04v-26.33h50.66v49.87h-19.15v20.34h-63.83v8.38h-48.67"/>
<path d="M348.51 108.94V93.78h80.98v51.87h45.48v43.48h-25.93v157.98h25.93v43.49H425.9v82.98h-69.41V540.6h69.41v-24.85h48.67v14.08h49.47M348.51 117.32v13.57h-59.05v-13.57M50.02 111.69V93.24h-33.2M9.78 93.24H2.83M38.96 22.48v70.76M9.78 66.41H2.72M16.82 66.41h22.14M16.82 38.24h22.14M9.78 38.24H2.72M38.96 14.43V6.04M72.16 14.43V6.04M72.16 22.48v18.78M126.48 14.43V6.04M38.96 41.26h87.52V22.48M141.91 6.04v43.94M126.48 41.26v20.12H55.39v33.2h89.87M120.11 61.38v33.2"/>
<path d="M141.91 57.86V74.8h-21.8M126.48 61.38h18.78M157.37 49.98V34.24h-15.46 15.46v15.74M202.5 93.24h-45.13V57.86v35.38h45.13"/>
<path d="M154.03 61.38h19.43v20.53h32.49V61.38h36.74v20.53h46.77v25.84-13.97H202.5v48.68h-45.48V389h46.67v85.38h70.62v66.22H202.1v-24.85h-48.28v13.28H45.71v-13.28H0v-95.16h66.71V111.69H2.9L2.47 6.04h153.24v16.59l134.9-1.31V2.11h57.63v20.08h125.73V6.48h154.12v5.67h17.9v20.52H670v50.21h-42.35V44.9H538.1v81.2h88.24V97.28H670v44.97h-20.52v21.83H538.15v69.42H670v10.91h5.24v9.61h13.09V9.97h9.61v-4.8h70.72v6.98h11.35v161.1"/>
<path d="M195.97 22.24v19.87h-38.6M230.75 21.9v22.24h28.11v23.78h30.6M326.33 22.24h21.91M148.31 245.7h-22.94V121.91h77.13M157.02 190.96h-31.65M147.89 284.43h-22.52v92.84M147.89 373.27h-22.52M147.89 343.59h-22.52M147.89 329.27h-22.52M147.89 315.38h-22.52M125.37 384.64v9.9M157.02 389h-31.65M125.37 400.64v21.05h18.31v38.53h34.74M144.73 394.54V389M178.42 394.54v-4.95M190.42 394.54V389"/>
<path d="M181.57 400.64h-3.15v-2.52 79.15M181.58 471.17h-3.16M178.42 421.06h-34.74M144.73 400.94v20.12M84.89 421.06h40.48M94.4 400.64v20.42M110.43 400.64v20.42M94.4 404.53h16.03M84.89 411h9.51M77.56 411H66.71M77.56 421.06H66.71M36 426.26v-5.67M58 426.26v-5.67M9.38 433.6H0M9.38 460.22H0M9.38 491.72H0M16.99 511.82v3.93M16.99 505.85v-14.13h28.79v14.13M16.99 460.22h43.19M16.99 433.6H58v26.62M64.52 442.83H58M70.23 442.83h7.33M76.86 431.37v60.35M81.36 433.6h-4.5M60.18 491.72h-14.4v-31.5M65.35 491.72h15.17M87.19 491.72h28.31M87.19 421.06v39.16H143.68M110.43 491.72v-31.5M123.19 463.81v-3.59M123.19 468.06v41.85h-15.77M110.43 517.4v-7.49M97.1 517.4v-25.68M101.35 509.91H97.1M45.78 502.84H97.1M61.26 517.4v-14.56M80.52 517.4v-14.56M61.26 523.66v5.37M80.52 523.66v5.37M97.1 523.66v5.37M110.43 523.66v5.37M136.94 471.17h-13.75M146.24 471.17h19.82v13.47h-42.87M178.42 484.64h-12.36M176.17 515.75v-31.11M153.82 515.75v-31.11M202.05 483.42v32.33M190.42 398.9v73h13.27M186.48 471.17h3.94M66.71 390.81h43.72V94.58M215.6 504.86h58.71M209.54 504.86h-7.49M209.54 493.94h-7.49M218.23 493.94h14.16v-10.52M232.39 477.27v-2.89M253.62 504.86v-30.48M232.39 499.59v5.27M220.05 499.59v5.27M276.08 67.92l-.7-25.81h15.81V21.32h23.19M348.51 93.78v-9.93h135.75"/>
<path d="M468.85 99.64H479V83.85M430.89 99.64h17.29V83.85M461.71 99.64h-13.53M459.08 120.31V99.64M459.08 126.7v18.95M507.94 83.85h15.41V26.73h-27.44V6.48M523.35 88.82v-4.97M521.1 99.64h17.03M523.35 95.51v4.13M500.8 83.85h-8.27v15.79h24.81M512.83 136.17V99.64M538.13 117.91h-25.3M512.83 142.49V260.5h37.58v-27M538.13 147h-25.3M538.13 126.1v39.69M536.4 370.25v21.81h-40.87v-57.77h17.3V271.5h37.58v30.13M554.76 379.62v18.5M536.4 400.64v-8.58M477.37 398.12v19.62M425.9 515.75v-30.6h32.03v-93.38M528.49 498.09h-53.92v17.66M534.16 498.09h37.09v-20.52M540.34 529.83v-31.74M521.8 529.83v-31.74M778.32 120.31h-55.63v132.08h-36.05M746.83 125.14v-4.83M746.83 136.17v-6.5"/>
<path d="M763.52 120.31v26.9h5.38-29.71M746.83 142.11v5.1M732.48 147.21h-9.79M773.71 147.21h4.61M746.83 132.92h16.69M837.92 6.82V41.12M871.02 75.03V38.29h-33.1M837.92 47.91V76.2h-30.23M845.85 76.2h8.92M833.68 186.35h21.09M825.48 186.35h-17.79M844.22 197v-10.65M811.9 210.01h-13.78M817.84 210.01h110.9M844.22 203.79v57.99M833.68 252.39h10.54M825.48 252.39h-27.36M864.52 230.66v-20.65M885.74 228.96v-18.95M905.82 227.55v-17.54M928.74 230.66v-25.74M928.74 194.08v-8.54M844.22 253.58h48.59M864.52 238.87v14.71M905.82 238.87v19.52M898.47 253.58h15.27M920.25 253.58h71.01M928.74 238.87v19.52M991.26 230.66v-44.31M991.26 237.17v46.11M833.68 282.43h226.04v115.14h-89.4M844.22 271.36v11.07M825.48 284.32h-45.92"/>
<path d="M855.18 282.43v115.14h95.34"/>
<path d="M935.53 397.57V295.45h48.65v102.12M818.4 402.95h-17.89M844.23 402.95h17.18v-5.38 15.85M861.41 421.9v18.17M932.7 413.42v-15.85M932.7 421.9v18.17M989.28 421.9v18.17M989.28 413.42v-15.85M1059.72 421.9v18.17M1079.18 397.57h-19.46v15.85M1104.15 397.57h17.11M1080.93 368.9h-21.21M1088.82 368.9h13.58V210.01H991.26M1011.72 228.96v-18.95M950.52 253.58v28.85M885.74 282.43v-43.56M1104.15 368.9h17.11M449.04 273.93h26.01v-84.8M194.82 447.94h-4.4M199.26 447.94h2.79M194.82 425.26h-4.4M199.26 425.26H202M186.29 400.94h4.13M538.1 44.9h-14.75M592.52 370.25v43.49M760.22 337.32v-50.55h-13.53l-5.41-9.83H729.7l-6.41 9.83h-15.13v51.5M708.16 350.01v57.06h52.06v-57.64M722.69 252.39h57.33"/>
<path d="M935.53 374.18h21.53v-12.91h27.12"/>
</g>
<g className="map__section_4">
{routeList.map(route => {
return <path key={route.id} d={route.d} />
})}
</g>
</svg>
{roomsList.map(room => {
return <div className={`map__marker${this.props.profile.position === room.id ? ' map__marker_you': ''}`} key={room.id} style={{top: `${room.cy / this.state.zoom}px`, left: `${room.cx / this.state.zoom}px`}}>{room.id}</div>
})}
</div>
</div>
</div>
</div>
}
}
export default connect(state => {
return {
profile: state.profile
}
})(Map)
You can’t perform that action at this time.