From bbe3a425f3571e52153da43725131690a6557bb1 Mon Sep 17 00:00:00 2001 From: Yuly Lapkin <127262950+lapkin25@users.noreply.github.com> Date: Sun, 5 Nov 2023 17:12:53 +1000 Subject: [PATCH 01/13] Update Plan_VVSU.js --- VVSU/js/Plan_VVSU.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/VVSU/js/Plan_VVSU.js b/VVSU/js/Plan_VVSU.js index f82dd7c..a877fed 100644 --- a/VVSU/js/Plan_VVSU.js +++ b/VVSU/js/Plan_VVSU.js @@ -326,11 +326,11 @@ let planXML = ` - wall + - + @@ -358,7 +358,7 @@ let planXML = ` - + @@ -383,7 +383,7 @@ let planXML = ` - + @@ -392,7 +392,7 @@ let planXML = ` - + @@ -418,7 +418,7 @@ let planXML = ` - + @@ -428,7 +428,7 @@ let planXML = ` - + From 8612b827210e0b1ddc9fe1d90e7024e7ac178659 Mon Sep 17 00:00:00 2001 From: Yuly Lapkin <127262950+lapkin25@users.noreply.github.com> Date: Sun, 5 Nov 2023 18:50:02 +1000 Subject: [PATCH 02/13] Update Plan_VVSU.js --- VVSU/js/Plan_VVSU.js | 505 +++++++++++++++++++++++++------------------ 1 file changed, 289 insertions(+), 216 deletions(-) diff --git a/VVSU/js/Plan_VVSU.js b/VVSU/js/Plan_VVSU.js index a877fed..b31efaa 100644 --- a/VVSU/js/Plan_VVSU.js +++ b/VVSU/js/Plan_VVSU.js @@ -105,15 +105,21 @@ let planXML = ` - - - - - - - - - + + + + + + + + + + + + + + + @@ -121,191 +127,236 @@ let planXML = ` - + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + - wall - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - + + + + + + + + + + - - - - + + + + + + + @@ -326,30 +377,41 @@ let planXML = ` - - - - - + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + - + + + + + @@ -366,12 +428,17 @@ let planXML = ` - + + - + + + + + @@ -404,34 +471,40 @@ let planXML = ` + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + From 62ffb8e9863121f5b2bb84f03fb5aa2c880da51f Mon Sep 17 00:00:00 2001 From: Yuly Lapkin <127262950+lapkin25@users.noreply.github.com> Date: Sun, 5 Nov 2023 18:53:12 +1000 Subject: [PATCH 03/13] Update Plan_VVSU.js --- VVSU/js/Plan_VVSU.js | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/VVSU/js/Plan_VVSU.js b/VVSU/js/Plan_VVSU.js index b31efaa..2b6dee6 100644 --- a/VVSU/js/Plan_VVSU.js +++ b/VVSU/js/Plan_VVSU.js @@ -155,28 +155,27 @@ let planXML = ` - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + From 6b26bcab71bfc76d228506952f196f38bfda3e12 Mon Sep 17 00:00:00 2001 From: Yuly Lapkin <127262950+lapkin25@users.noreply.github.com> Date: Thu, 23 Nov 2023 13:23:21 +1000 Subject: [PATCH 04/13] =?UTF-8?q?=D0=9E=D1=88=D0=B8=D0=B1=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=B2=20=D0=BF=D0=BB=D0=B0=D0=BD=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit У корневых должны присутствовать атрибуты dir и start. --- VVSU/js/Plan_VVSU.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/VVSU/js/Plan_VVSU.js b/VVSU/js/Plan_VVSU.js index 2b6dee6..250d9ce 100644 --- a/VVSU/js/Plan_VVSU.js +++ b/VVSU/js/Plan_VVSU.js @@ -128,12 +128,11 @@ let planXML = ` - - + @@ -188,7 +187,7 @@ let planXML = ` - + @@ -255,7 +254,7 @@ let planXML = ` - + @@ -355,7 +354,7 @@ let planXML = ` - + From 018307e6539f023986479cbd236753b3c61c6d44 Mon Sep 17 00:00:00 2001 From: Yuly Lapkin <127262950+lapkin25@users.noreply.github.com> Date: Fri, 24 Nov 2023 15:08:38 +1000 Subject: [PATCH 05/13] =?UTF-8?q?=D0=9F=D1=80=D0=BE=D0=B2=D0=B5=D1=80?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BE=D0=BA=20=D0=B2=20?= =?UTF-8?q?=D0=BF=D0=BB=D0=B0=D0=BD=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- read_plan.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/read_plan.js b/read_plan.js index db0bf4a..8f13355 100644 --- a/read_plan.js +++ b/read_plan.js @@ -210,6 +210,9 @@ function read_plan () for (floor_child of plan_child.childNodes) { if (floor_child.tagName == "Path") { // обрабатываем путь перемещения + if (!("dir" in floor_child.attributes)) { + alert("Поле dir отсутствует в корневом теге "); + } let dir_str = floor_child.attributes["dir"].nodeValue; let dir = motionDirForStr(dir_str); let path = { @@ -223,6 +226,9 @@ function read_plan () // добавляем начальный пункт к пути // тут важно указать этаж, поскольку пункт может оказаться // лестницей или лифтом, для которых идентификатор один и тот же на разных этажах + if (!("start" in floor_child.attributes)) { + alert("Поле start отсутствует в корневом теге "); + } let point_index = get_point_by_id(floor_child.attributes["start"].nodeValue, floor_num); add_point_to_path(point_index, path_index); // читаем путь From 038d3eed37484e5ec9eef35e1aeb1deaebe0a711 Mon Sep 17 00:00:00 2001 From: Yuly Lapkin <127262950+lapkin25@users.noreply.github.com> Date: Fri, 24 Nov 2023 15:35:03 +1000 Subject: [PATCH 06/13] Update show_route.js --- VVSU/js/show_route.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VVSU/js/show_route.js b/VVSU/js/show_route.js index d23be8c..a303730 100644 --- a/VVSU/js/show_route.js +++ b/VVSU/js/show_route.js @@ -50,7 +50,7 @@ function showRoute() //let route_str = route.join("
"); let route_str = route.map((val, idx) => { - return getRouteStepComponentString(val, getRandomInt(2) === 1 ? 'Пример текста' : ''); + return getRouteStepComponentString(val.route, val.detailed_route); }).join(' '); outputContainer.innerHTML = route_str; From dedc923be98f3655698eee7ac714e30d8c80eef5 Mon Sep 17 00:00:00 2001 From: Yuly Lapkin <127262950+lapkin25@users.noreply.github.com> Date: Fri, 24 Nov 2023 15:36:21 +1000 Subject: [PATCH 07/13] Update find_route.js --- find_route.js | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/find_route.js b/find_route.js index 9965bf1..ca15acd 100644 --- a/find_route.js +++ b/find_route.js @@ -46,6 +46,7 @@ function get_edge (point, adj_point_index) function get_route_text (route) { let route_text = []; + // let detailed_route_text = []; let i = 0; let j = 0; let edge = get_edge(plan.points[route[0]], route[1]); @@ -70,11 +71,15 @@ function get_route_text (route) } if (path_index == -1) { floorText = " с " + plan.points[route[i]].floor + " этажа до " + plan.points[route[j]].floor + " этажа."; - route_text.push("Пройти по лестнице" + floorText); + route_text.push({route: "Пройти по лестнице" + floorText, + detailed_route: ""}); + // detailed_route_text.push(""); } else if (path_index == -2) { - route_text.push("Проехать на лифте."); + route_text.push({route: "Проехать на лифте.", + detailed_route: ""}); } else { let text = "Пройти " + plan.points[route[i]].name + " - " + plan.points[route[j]].name; + let detailed_text = ""; if (j > i + 1) { let hidden = true; for (let k = i + 1; k < j; k++) { @@ -84,21 +89,21 @@ function get_route_text (route) } } if (!hidden) { - text += " мимо: "; + detailed_text += " мимо: "; } let flag = false; for (let k = i + 1; k < j; k++) { if (!plan.points[route[k]].hidden) { if (flag) { - text += ", "; + detailed_text += ", "; } flag = true; - text += plan.points[route[k]].name; + detailed_text += plan.points[route[k]].name; } } } text += "."; - route_text.push(text); + route_text.push({route: text, detailed_route: detailed_text}); } if (new_path_index >= 0 && path_index >= 0) { @@ -113,11 +118,14 @@ function get_route_text (route) let d = (dir1 - dir2 + 4) % 4; if (d > motionDirForStr("up")) { if (motionDir[d] == "left") { - route_text.push("Поверните налево."); + route_text.push({route: "Поверните налево.", + detailed_route: "аккуратно"}); } else if (motionDir[d] == "down") { - route_text.push("Поверните назад."); + route_text.push({route: "Поверните назад.", + detailed_route: "внимательно"}); } else if (motionDir[d] == "right") { - route_text.push("Поверните направо."); + route_text.push({route: "Поверните направо.", + detailed_route: "осторожно"}); } } } @@ -129,7 +137,7 @@ function get_route_text (route) break; } } - return route_text; + return route_text; // { route: route_text, detailed_route: detailed_route_text }; } function findRoute (point_from, point_to) @@ -163,4 +171,4 @@ function findRoute (point_from, point_to) let route_text = get_route_text(route); //route_strs.push.apply(route_strs, route_text); // добавить route_text к route_strs return route_text; -} \ No newline at end of file +} From e7228b3f0e7508d40d5f85eb43cb0802df6f5107 Mon Sep 17 00:00:00 2001 From: Yuly Lapkin <127262950+lapkin25@users.noreply.github.com> Date: Sun, 26 Nov 2023 07:11:12 +1000 Subject: [PATCH 08/13] =?UTF-8?q?=D0=A1=D0=BF=D1=80=D0=B0=D0=B2=D0=BE?= =?UTF-8?q?=D1=87=D0=BD=D0=B8=D0=BA:=20=D0=B8=D0=B7=D0=B1=D1=80=D0=B0?= =?UTF-8?q?=D0=BD=D0=BD=D0=BE=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VVSU/js/Plan_VVSU.js | 12 ++++++------ VVSU/js/point_refs.js | 17 +++++++++++++++-- read_plan.js | 3 ++- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/VVSU/js/Plan_VVSU.js b/VVSU/js/Plan_VVSU.js index 250d9ce..4e68855 100644 --- a/VVSU/js/Plan_VVSU.js +++ b/VVSU/js/Plan_VVSU.js @@ -7,12 +7,12 @@ let planXML = ` - + - + - + @@ -32,7 +32,7 @@ let planXML = ` - + @@ -85,10 +85,10 @@ let planXML = ` - + - + diff --git a/VVSU/js/point_refs.js b/VVSU/js/point_refs.js index e10b6f8..2517836 100644 --- a/VVSU/js/point_refs.js +++ b/VVSU/js/point_refs.js @@ -18,6 +18,7 @@ function getFloorArray() { let floorSet = new Set() const len = plan.points.length; + pointsHTMLByFloor['fav'] = ''; for (let i = 0; i < len; i++) { //console.log(plan.points[i].floor) let point = plan.points[i]; @@ -32,6 +33,10 @@ function getFloorArray() { pointsHTMLByFloor[floorNumber] += str; } } + + if (point.fav) { + pointsHTMLByFloor['fav'] += pointNameToHTML(point.name, point.id); + } } return Array.from(floorSet).sort(); @@ -42,8 +47,12 @@ function createFloorMenuItems(floor_array) referencesFloorMenu.innerHTML = ''; const len = floor_array.length; + let e = document.createElement('li'); + e.setAttribute('data-floor', 'fav'); + e.innerHTML = '☆'; + referencesFloorMenu.appendChild(e); for(let i=0; i Date: Sun, 26 Nov 2023 08:32:18 +1000 Subject: [PATCH 09/13] Update point_refs.js --- VVSU/js/point_refs.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/VVSU/js/point_refs.js b/VVSU/js/point_refs.js index 2517836..f114e18 100644 --- a/VVSU/js/point_refs.js +++ b/VVSU/js/point_refs.js @@ -49,7 +49,8 @@ function createFloorMenuItems(floor_array) const len = floor_array.length; let e = document.createElement('li'); e.setAttribute('data-floor', 'fav'); - e.innerHTML = '☆'; + // e.innerHTML = '☆'; + e.innerHTML = '✭'; referencesFloorMenu.appendChild(e); for(let i=0; i Date: Sun, 26 Nov 2023 08:51:28 +1000 Subject: [PATCH 10/13] =?UTF-8?q?Id=20=D0=B2=20=D0=BB=D1=8E=D0=B1=D0=BE?= =?UTF-8?q?=D0=BC=20=D1=80=D0=B5=D0=B3=D0=B8=D1=81=D1=82=D1=80=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VVSU/js/Plan_VVSU.js | 2 +- VVSU/js/show_route.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/VVSU/js/Plan_VVSU.js b/VVSU/js/Plan_VVSU.js index 4e68855..f95e853 100644 --- a/VVSU/js/Plan_VVSU.js +++ b/VVSU/js/Plan_VVSU.js @@ -7,7 +7,7 @@ let planXML = ` - + diff --git a/VVSU/js/show_route.js b/VVSU/js/show_route.js index a303730..c0778d4 100644 --- a/VVSU/js/show_route.js +++ b/VVSU/js/show_route.js @@ -36,8 +36,8 @@ function getRandomInt(max) { function showRoute() { if (!state) { - let from_point = fromField.value; - let to_point = toField.value; + let from_point = fromField.value.toLowerCase(); + let to_point = toField.value.toLowerCase(); let route = ''; try { From ea036161d29f3840e42dd98f46f7bbb5e5880b38 Mon Sep 17 00:00:00 2001 From: Yuly Lapkin <127262950+lapkin25@users.noreply.github.com> Date: Sun, 26 Nov 2023 11:31:54 +1000 Subject: [PATCH 11/13] Update Plan_VVSU.js --- VVSU/js/Plan_VVSU.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/VVSU/js/Plan_VVSU.js b/VVSU/js/Plan_VVSU.js index f95e853..c03be89 100644 --- a/VVSU/js/Plan_VVSU.js +++ b/VVSU/js/Plan_VVSU.js @@ -7,17 +7,17 @@ let planXML = ` - + - + - + - + @@ -32,7 +32,7 @@ let planXML = ` - + @@ -63,7 +63,7 @@ let planXML = ` - + @@ -85,10 +85,10 @@ let planXML = ` - + - + From 2f53a388b4b07582ca56d51ec314420e104c2729 Mon Sep 17 00:00:00 2001 From: Yuly Lapkin <127262950+lapkin25@users.noreply.github.com> Date: Sat, 2 Dec 2023 19:23:44 +1000 Subject: [PATCH 12/13] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=BF=D0=BB=D0=B0=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit От студентов ИБ-21-1 --- VVSU/js/Plan_VVSU.js | 542 ++++++++++++++++++++++++------------------- 1 file changed, 307 insertions(+), 235 deletions(-) diff --git a/VVSU/js/Plan_VVSU.js b/VVSU/js/Plan_VVSU.js index c03be89..bc47d50 100644 --- a/VVSU/js/Plan_VVSU.js +++ b/VVSU/js/Plan_VVSU.js @@ -72,7 +72,72 @@ let planXML = ` - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -82,42 +147,44 @@ let planXML = ` + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -131,50 +198,51 @@ let planXML = ` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -186,61 +254,62 @@ let planXML = ` - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -253,97 +322,99 @@ let planXML = ` - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - + + + + + + + + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - + + + + - - - - - + + + + + + - - + + + @@ -353,35 +424,36 @@ let planXML = ` - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + -
+ From 46617b882233d5202bad5a9e392e9bde6851a877 Mon Sep 17 00:00:00 2001 From: Yuly Lapkin <127262950+lapkin25@users.noreply.github.com> Date: Sat, 2 Dec 2023 19:52:53 +1000 Subject: [PATCH 13/13] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20=D0=BF=D0=BB=D0=B0=D0=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit От студентов ИБ-21-1 --- VVSU/js/Plan_VVSU.js | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/VVSU/js/Plan_VVSU.js b/VVSU/js/Plan_VVSU.js index bc47d50..dbb4c9e 100644 --- a/VVSU/js/Plan_VVSU.js +++ b/VVSU/js/Plan_VVSU.js @@ -54,7 +54,7 @@ let planXML = ` - + @@ -314,6 +314,25 @@ let planXML = `
+ + + + + + + + + + + + + + + + + + +