Додана сторінка "історія служіння"
This commit is contained in:
@@ -799,22 +799,37 @@ const Constructor = {
|
||||
|
||||
delete(house) {
|
||||
// убрать слой с карты
|
||||
if (Constructor.info.type === 'house') {
|
||||
if (Editor.info.type === 'house') {
|
||||
houseGroup.removeLayer(house);
|
||||
} else if (Constructor.info.type === 'homestead') {
|
||||
} else if (Editor.info.type === 'homestead') {
|
||||
homesteadGroup.removeLayer(house);
|
||||
}
|
||||
|
||||
// найти индекс полигона в points
|
||||
const index = Constructor.info.points.findIndex(p => p === house.getLatLngs());
|
||||
const target = house.getLatLngs()[0]; // вершины полигона
|
||||
|
||||
if (index !== -1) {
|
||||
// удалить из points и points_number по индексу
|
||||
Constructor.info.points.splice(index, 1);
|
||||
Constructor.info.points_number.splice(index, 1);
|
||||
const index = Editor.info.points.findIndex((p) => {
|
||||
const copy = p.slice(); // делаем копию
|
||||
copy[0].pop(); // убираем последний элемент
|
||||
|
||||
if (isSamePolygon(p, target)) return true; // проверка как есть
|
||||
if (isSamePolygon(copy, target)) return true; // проверка без последнего
|
||||
return false;
|
||||
});
|
||||
|
||||
function isSamePolygon(a, b) {
|
||||
if (a.length !== b.length) return false;
|
||||
return a.every((pt, i) => pt.lat === b[i].lat && pt.lng === b[i].lng);
|
||||
}
|
||||
|
||||
Constructor.osm.autoZoom(Constructor.info.points);
|
||||
|
||||
if (index) {
|
||||
// удалить из points и points_number по индексу
|
||||
Editor.info.points.splice(index, 1);
|
||||
Editor.info.points_number.splice(index, 1);
|
||||
}
|
||||
|
||||
Editor.osm.autoZoom(Editor.info.points);
|
||||
},
|
||||
|
||||
async getOSM(wayId) {
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
margin: 20px 20px 0 20px;
|
||||
}
|
||||
|
||||
#part-1,
|
||||
#part-2,
|
||||
#part-3 {
|
||||
.page-constructor>#part-1,
|
||||
.page-constructor>#part-2,
|
||||
.page-constructor>#part-3 {
|
||||
border-radius: 10px;
|
||||
width: calc(100% - 40px);
|
||||
display: flex;
|
||||
@@ -23,9 +23,9 @@
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#part-1>h1,
|
||||
#part-2>h1,
|
||||
#part-3>h1 {
|
||||
.page-constructor>#part-1>h1,
|
||||
.page-constructor>#part-2>h1,
|
||||
.page-constructor>#part-3>h1 {
|
||||
width: calc(100% - 40px);
|
||||
color: var(--ColorThemes3);
|
||||
border-radius: var(--border-radius);
|
||||
@@ -35,19 +35,19 @@
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#part-1>h1>span,
|
||||
#part-2>h1>span,
|
||||
#part-3>h1>span {
|
||||
.page-constructor>#part-1>h1>span,
|
||||
.page-constructor>#part-2>h1>span,
|
||||
.page-constructor>#part-3>h1>span {
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
#part-1>#info-type {
|
||||
.page-constructor>#part-1>#info-type {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#part-1>#info-type>.tabs {
|
||||
.page-constructor>#part-1>#info-type>.tabs {
|
||||
display: flex;
|
||||
position: relative;
|
||||
background-color: var(--ColorThemes0);
|
||||
@@ -58,11 +58,11 @@
|
||||
}
|
||||
|
||||
|
||||
#part-1>#info-type>.tabs>input[type="radio"] {
|
||||
.page-constructor>#part-1>#info-type>.tabs>input[type="radio"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#part-1>#info-type>.tabs>.tab {
|
||||
.page-constructor>#part-1>#info-type>.tabs>.tab {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -77,23 +77,23 @@
|
||||
z-index: 2;
|
||||
}
|
||||
|
||||
#part-1>#info-type>.tabs>.tab>svg {
|
||||
.page-constructor>#part-1>#info-type>.tabs>.tab>svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
}
|
||||
|
||||
#part-1>#info-type>.tabs>.tab>span {
|
||||
.page-constructor>#part-1>#info-type>.tabs>.tab>span {
|
||||
margin-left: 6px;
|
||||
font-size: var(--FontSize1);
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
#part-1>#info-type>.tabs>input[type="radio"]:checked+label {
|
||||
.page-constructor>#part-1>#info-type>.tabs>input[type="radio"]:checked+label {
|
||||
color: var(--PrimaryColorText);
|
||||
fill: var(--PrimaryColorText);
|
||||
}
|
||||
|
||||
#part-1>#info-type>.tabs>.glider {
|
||||
.page-constructor>#part-1>#info-type>.tabs>.glider {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
height: 40px;
|
||||
@@ -105,47 +105,47 @@
|
||||
}
|
||||
|
||||
@media (min-width: 601px) {
|
||||
#part-1>#info-type>.tabs>input[id="info-type-house"]:checked~.glider {
|
||||
.page-constructor>#part-1>#info-type>.tabs>input[id="info-type-house"]:checked~.glider {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
#part-1>#info-type>.tabs>input[id="info-type-homestead"]:checked~.glider {
|
||||
.page-constructor>#part-1>#info-type>.tabs>input[id="info-type-homestead"]:checked~.glider {
|
||||
transform: translateX(100%);
|
||||
}
|
||||
|
||||
#part-1>#info-type>.tabs>input[id="info-type-points"]:checked~.glider {
|
||||
.page-constructor>#part-1>#info-type>.tabs>input[id="info-type-points"]:checked~.glider {
|
||||
transform: translateX(200%);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
#part-1>#info-type>.tabs {
|
||||
.page-constructor>#part-1>#info-type>.tabs {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
#part-1>#info-type>.tabs>.tab {
|
||||
.page-constructor>#part-1>#info-type>.tabs>.tab {
|
||||
width: calc(100% - 8px);
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
#part-1>#info-type>.tabs>.glider {
|
||||
.page-constructor>#part-1>#info-type>.tabs>.glider {
|
||||
width: calc(100% - 8px);
|
||||
}
|
||||
|
||||
#part-1>#info-type>.tabs>input[id="info-type-house"]:checked~.glider {
|
||||
.page-constructor>#part-1>#info-type>.tabs>input[id="info-type-house"]:checked~.glider {
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
#part-1>#info-type>.tabs>input[id="info-type-homestead"]:checked~.glider {
|
||||
.page-constructor>#part-1>#info-type>.tabs>input[id="info-type-homestead"]:checked~.glider {
|
||||
transform: translateY(100%);
|
||||
}
|
||||
|
||||
#part-1>#info-type>.tabs>input[id="info-type-points"]:checked~.glider {
|
||||
.page-constructor>#part-1>#info-type>.tabs>input[id="info-type-points"]:checked~.glider {
|
||||
transform: translateY(200%);
|
||||
}
|
||||
}
|
||||
|
||||
#part-1>form>div {
|
||||
.page-constructor>#part-1>form>div {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
margin: 20px 0;
|
||||
@@ -153,7 +153,7 @@
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
#part-1>form>div>label {
|
||||
.page-constructor>#part-1>form>div>label {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
@@ -162,7 +162,7 @@
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
#part-1>form>div>input {
|
||||
.page-constructor>#part-1>form>div>input {
|
||||
width: calc(100% - 10px);
|
||||
min-width: 140px;
|
||||
padding: 0 5px;
|
||||
@@ -173,9 +173,9 @@
|
||||
font-size: var(--FontSize2);
|
||||
}
|
||||
|
||||
#part-1>form>button,
|
||||
#part-2>button,
|
||||
#part-3>button {
|
||||
.page-constructor>#part-1>form>button,
|
||||
.page-constructor>#part-2>button,
|
||||
.page-constructor>#part-3>button {
|
||||
border-radius: 6px;
|
||||
background: var(--PrimaryColor);
|
||||
color: var(--PrimaryColorText);
|
||||
@@ -187,27 +187,27 @@
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
#part-2>.osm-info {
|
||||
.page-constructor>#part-2>.osm-info {
|
||||
padding-bottom: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
#part-2>.osm-info>div {
|
||||
.page-constructor>#part-2>.osm-info>div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#part-2>.osm-info>div {
|
||||
.page-constructor>#part-2>.osm-info>div {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
#part-2>.osm-info>div>label {
|
||||
.page-constructor>#part-2>.osm-info>div>label {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
@@ -216,13 +216,13 @@
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
#part-2>.osm-info>div>div {
|
||||
.page-constructor>#part-2>.osm-info>div>div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#part-2>.osm-info>div>div>input {
|
||||
.page-constructor>#part-2>.osm-info>div>div>input {
|
||||
width: calc(100% - 10px);
|
||||
min-width: 140px;
|
||||
padding: 0 5px;
|
||||
@@ -233,25 +233,25 @@
|
||||
font-size: var(--FontSize2);
|
||||
}
|
||||
|
||||
#part-2>.osm-info>div>div>a {
|
||||
.page-constructor>#part-2>.osm-info>div>div>a {
|
||||
height: 26px;
|
||||
width: 26px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
|
||||
#part-2>.osm-info>div>div>a>svg {
|
||||
.page-constructor>#part-2>.osm-info>div>div>a>svg {
|
||||
height: 26px;
|
||||
width: 26px;
|
||||
fill: var(--ColorThemes3);
|
||||
}
|
||||
|
||||
#part-2>.osm-info>span {
|
||||
.page-constructor>#part-2>.osm-info>span {
|
||||
font-size: var(--FontSize5);
|
||||
margin: 10px;
|
||||
color: var(--ColorThemes3);
|
||||
}
|
||||
|
||||
#part-2>.osm-info>button {
|
||||
.page-constructor>#part-2>.osm-info>button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -267,7 +267,7 @@
|
||||
font-size: var(--FontSize3);
|
||||
}
|
||||
|
||||
#part-2>.block-map {
|
||||
.page-constructor>#part-2>.block-map {
|
||||
width: 100%;
|
||||
height: 500px;
|
||||
border-radius: 6px;
|
||||
@@ -279,12 +279,12 @@
|
||||
box-shadow: var(--shadow-l1);
|
||||
}
|
||||
|
||||
#part-2>#map {
|
||||
.page-constructor>#part-2>.block-map>#map {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
#part-3>input {
|
||||
.page-constructor>#part-3>input {
|
||||
font-weight: 500;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
@@ -298,12 +298,12 @@
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
#part-3>#house {
|
||||
.page-constructor>#part-3>#house {
|
||||
display: flex;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#part-3>#house>button {
|
||||
.page-constructor>#part-3>#house>button {
|
||||
display: flex;
|
||||
position: relative;
|
||||
width: 34px;
|
||||
@@ -319,14 +319,14 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#part-3>#house>button>svg {
|
||||
.page-constructor>#part-3>#house>button>svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
fill: var(--PrimaryColorText);
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
#part-3>#house>.entrance {
|
||||
.page-constructor>#part-3>#house>.entrance {
|
||||
min-height: 200px;
|
||||
border: 1px solid var(--ColorThemes3);
|
||||
border-style: dashed;
|
||||
@@ -334,7 +334,7 @@
|
||||
margin: 0 10px 10px 0;
|
||||
}
|
||||
|
||||
#part-3>#house>.entrance>.entrance-info>input {
|
||||
.page-constructor>#part-3>#house>.entrance>.entrance-info>input {
|
||||
text-align: center;
|
||||
font-size: var(--FontSize5);
|
||||
font-weight: 400;
|
||||
@@ -346,8 +346,8 @@
|
||||
width: calc(100% - 14px - 20px);
|
||||
}
|
||||
|
||||
#part-3>#house>.entrance>.entrance-info>button,
|
||||
#part-3>#house>.entrance>.floor>.floor-info>button {
|
||||
.page-constructor>#part-3>#house>.entrance>.entrance-info>button,
|
||||
.page-constructor>#part-3>#house>.entrance>.floor>.floor-info>button {
|
||||
display: flex;
|
||||
position: relative;
|
||||
width: 34px;
|
||||
@@ -362,15 +362,15 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#part-3>#house>.entrance>.entrance-info>button>svg,
|
||||
#part-3>#house>.entrance>.floor>.floor-info>button>svg {
|
||||
.page-constructor>#part-3>#house>.entrance>.entrance-info>button>svg,
|
||||
.page-constructor>#part-3>#house>.entrance>.floor>.floor-info>button>svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
fill: var(--PrimaryColorText);
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
#part-3>#house>.entrance>.floor {
|
||||
.page-constructor>#part-3>#house>.entrance>.floor {
|
||||
position: relative;
|
||||
display: flex;
|
||||
width: calc(100% - 22px);
|
||||
@@ -379,7 +379,7 @@
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
#part-3>#house>.entrance>.floor>.floor-info>h2 {
|
||||
.page-constructor>#part-3>#house>.entrance>.floor>.floor-info>h2 {
|
||||
position: absolute;
|
||||
width: 65px;
|
||||
right: -1px;
|
||||
@@ -393,7 +393,7 @@
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#part-3>#house>.entrance>.floor>.apartment {
|
||||
.page-constructor>#part-3>#house>.entrance>.floor>.apartment {
|
||||
display: flex;
|
||||
position: relative;
|
||||
width: 60px;
|
||||
@@ -406,7 +406,7 @@
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#part-3>#house>.entrance>.floor>.apartment>input {
|
||||
.page-constructor>#part-3>#house>.entrance>.floor>.apartment>input {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
font-size: var(--FontSize5);
|
||||
@@ -416,7 +416,7 @@
|
||||
background: 0;
|
||||
}
|
||||
|
||||
#part-3>#house>.entrance>.floor>.apartment>button {
|
||||
.page-constructor>#part-3>#house>.entrance>.floor>.apartment>button {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
@@ -433,22 +433,22 @@
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#part-3>#house>.entrance>.floor>.apartment>button>svg {
|
||||
.page-constructor>#part-3>#house>.entrance>.floor>.apartment>button>svg {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
fill: var(--PrimaryColorText);
|
||||
}
|
||||
|
||||
#part-3>.info {}
|
||||
.page-constructor>#part-3>.info {}
|
||||
|
||||
#part-3>.info>p {
|
||||
.page-constructor>#part-3>.info>p {
|
||||
font-size: var(--FontSize2);
|
||||
color: var(--ColorThemes3);
|
||||
opacity: 0.8;
|
||||
font-style: oblique;
|
||||
}
|
||||
|
||||
#part-3>.info>button {
|
||||
.page-constructor>#part-3>.info>button {
|
||||
border-radius: 6px;
|
||||
background: var(--ColorThemes3);
|
||||
width: fit-content;
|
||||
@@ -464,14 +464,14 @@
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
#part-3>.info>button>svg {
|
||||
.page-constructor>#part-3>.info>button>svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
fill: var(--ColorThemes0);
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
#part-3>.info>button>span {
|
||||
.page-constructor>#part-3>.info>button>span {
|
||||
font-size: var(--FontSize3);
|
||||
font-weight: 400;
|
||||
color: var(--ColorThemes0);
|
||||
|
||||
Reference in New Issue
Block a user