Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Mizinov committed Apr 30, 2024
1 parent f85d475 commit 9225dca
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 18 deletions.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
json.forEach(tile => {
const { id, code, lat, lon, label, name_ru, county_ru } = tile

const countyIndex = counties.findIndex(d => d === county_ru)
const countyIndex = counties.sort().findIndex(d => d === county_ru)

const rect = document.createElementNS(xmlns, 'rect')
rect.setAttributeNS(null, 'width', size - gap)
Expand Down
19 changes: 10 additions & 9 deletions styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,19 @@ body {

svg {
display: block;
width: max(100% - 20px, 850px);
height: auto;
width: 850px;
height: 500px;
}

.county-0 { fill: #66c2a5; }
.county-1 { fill: #fc8d62; }
.county-2 { fill: #8da0cb; }
.county-0 { fill: #dddddd; }
.county-1 { fill: #8da0cb; }
.county-2 { fill: #a6d854; }
.county-3 { fill: #e78ac3; }
.county-4 { fill: #a6d854; }
.county-5 { fill: #ffd92f; }
.county-6 { fill: #e5c494; }
.county-7 { fill: #b3b3b3; }
.county-4 { fill: #e5c494; }
.county-5 { fill: #fc8d62; }
.county-6 { fill: #b3b3b3; }
.county-7 { fill: #ffd92f; }
.county-8 { fill: #66c2a5; }

rect:hover {
opacity: .5;
Expand Down
8 changes: 4 additions & 4 deletions tilemap.csv
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ VGG,34,5,6,ВГГ,Волгоградская обл.,Южный
VLG,35,5,1,ВОЛ,Вологодская обл.,Северо-Западный
VOR,36,4,6,ВРЖ,Воронежская обл.,Центральный
DA,5,7,9,ДАГ,Дагестан,Северо-Кавказский
DNR,80,2,7,ДНР,Донецкая НР,Южный
DNR,80,2,7,ДНР,Донецкая НР,-
YEV,79,15,5,ЕАО,Еврейская АО,Дальневосточный
ZAB,75,14,5,ЗАБ,Забайкальский край,Дальневосточный
ZAP,85,1,7,ЗАП,Запорожская область,Южный
ZAP,85,1,7,ЗАП,Запорожская область,-
IVA,37,6,2,ИВА,Ивановская обл.,Центральный
IN,6,5,8,ИНГ,Ингушетия,Северо-Кавказский
IRK,38,13,4,ИРК,Иркутская обл.,Сибирский
Expand All @@ -39,7 +39,7 @@ KGN,45,10,6,КРГ,Курганская обл.,Уральский
KRS,46,2,5,КУР,Курская обл.,Центральный
LEN,47,4,1,Л.О.,Ленинградская обл.,Северо-Западный
LIP,48,4,5,ЛИП,Липецкая обл.,Центральный
LNR,81,3,7,ЛНР,Луганская НР,Южный
LNR,81,3,7,ЛНР,Луганская НР,-
MAG,49,15,3,МАГ,Магаданская обл.,Дальневосточный
ME,12,7,3,М-Э,Марий Эл,Приволжский
MO,13,6,5,МРД,Мордовия,Приволжский
Expand Down Expand Up @@ -80,7 +80,7 @@ UD,18,8,3,УДМ,Удмуртия,Приволжский
ULY,73,7,5,УЛН,Ульяновская обл.,Приволжский
KHA,27,15,4,ХАБ,Хабаровский край,Дальневосточный
KK,19,12,5,ХАК,Хакасия,Сибирский
KHR,84,1,8,ХРС,Херсонская область,Южный
KHR,84,1,8,ХРС,Херсонская область,-
KHM,86,10,3,Х-М,ХМАО – Югра,Уральский
CHE,74,9,6,ЧЕЛ,Челябинская обл.,Уральский
CE,95,6,9,ЧЕЧ,Чечня,Северо-Кавказский
Expand Down
8 changes: 4 additions & 4 deletions tilemap.json
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@
"lat": 7,
"label": "ДНР",
"name_ru": "Донецкая НР",
"county_ru": "Южный"
"county_ru": "-"
},
{
"id": "YEV",
Expand All @@ -168,7 +168,7 @@
"lat": 7,
"label": "ЗАП",
"name_ru": "Запорожская область",
"county_ru": "Южный"
"county_ru": "-"
},
{
"id": "IVA",
Expand Down Expand Up @@ -366,7 +366,7 @@
"lat": 7,
"label": "ЛНР",
"name_ru": "Луганская НР",
"county_ru": "Южный"
"county_ru": "-"
},
{
"id": "MAG",
Expand Down Expand Up @@ -735,7 +735,7 @@
"lat": 8,
"label": "ХРС",
"name_ru": "Херсонская область",
"county_ru": "Южный"
"county_ru": "-"
},
{
"id": "KHM",
Expand Down

0 comments on commit 9225dca

Please sign in to comment.