From 3629794adbb291716462c4c2032f29817ba00a18 Mon Sep 17 00:00:00 2001 From: julia221501 Date: Fri, 18 Oct 2024 08:19:00 +0200 Subject: [PATCH 01/16] =?UTF-8?q?log=20f=C3=BCr=20Testen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/NetworkMap.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/NetworkMap.vue b/src/components/NetworkMap.vue index 716e25f..14d1999 100644 --- a/src/components/NetworkMap.vue +++ b/src/components/NetworkMap.vue @@ -141,7 +141,7 @@ :x="egoCoords[0]" :y="egoCoords[1] + 1" class="mark" - style="font-size: 4px; cursor: pointer; text-anchor: middle;" + style="font-size: 4px; cursor: pointer; text-anchor: middle" > {{ egoEmoji }} @@ -687,6 +687,7 @@ export default defineComponent({ clearTimeout(clickTimeoutId); clickTimeoutId = null; console.log(alter.name + " dblclick"); + console.log("Text here"); // open form store.commit("openAlterFormById", { alterId: alter.id }); From db77c4d1ac19b26d15e56027a9acbe30dac799e6 Mon Sep 17 00:00:00 2001 From: julia221501 Date: Fri, 18 Oct 2024 09:45:16 +0200 Subject: [PATCH 02/16] anderes blau bei linie --- src/components/NetworkMap.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/NetworkMap.vue b/src/components/NetworkMap.vue index 14d1999..cc59a0d 100644 --- a/src/components/NetworkMap.vue +++ b/src/components/NetworkMap.vue @@ -842,7 +842,8 @@ line { line.select { // stroke: rgb(136, 159, 213); // stroke: rgb($fhstpblue, 0.6); - stroke: rgb(102, 150, 192); + stroke: rgb(28, 135, 230); + //altes blau rgb(102, 150, 192); } #position { From 41b876027d119d52975e08306f648b82acc12356 Mon Sep 17 00:00:00 2001 From: julia221501 Date: Fri, 18 Oct 2024 09:51:11 +0200 Subject: [PATCH 03/16] =?UTF-8?q?gr=C3=B6=C3=9Ferer=20Schatten?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/NetworkMap.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/NetworkMap.vue b/src/components/NetworkMap.vue index cc59a0d..b6f75ad 100644 --- a/src/components/NetworkMap.vue +++ b/src/components/NetworkMap.vue @@ -69,7 +69,7 @@ v-if="mark.selected" :cx="mark.x" :cy="mark.y" - r="4" + r="6" fill="url('#selected-gradient')" /> From a2f4dc4c86052d9ed3c6e7bd9100dc8d6b819f5e Mon Sep 17 00:00:00 2001 From: julia221501 Date: Fri, 18 Oct 2024 09:54:21 +0200 Subject: [PATCH 04/16] stroke-dasharray --- src/components/NetworkMap.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/NetworkMap.vue b/src/components/NetworkMap.vue index b6f75ad..e0b8c76 100644 --- a/src/components/NetworkMap.vue +++ b/src/components/NetworkMap.vue @@ -843,6 +843,7 @@ line.select { // stroke: rgb(136, 159, 213); // stroke: rgb($fhstpblue, 0.6); stroke: rgb(28, 135, 230); + stroke-dasharray: 2, 5; //altes blau rgb(102, 150, 192); } From 2db26618d4de60fd3089aae0a4e80e5233d96811 Mon Sep 17 00:00:00 2001 From: julia221501 Date: Fri, 18 Oct 2024 09:56:55 +0200 Subject: [PATCH 05/16] stroke-dasharray 2.0 --- src/components/NetworkMap.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/NetworkMap.vue b/src/components/NetworkMap.vue index e0b8c76..3788a1f 100644 --- a/src/components/NetworkMap.vue +++ b/src/components/NetworkMap.vue @@ -843,7 +843,7 @@ line.select { // stroke: rgb(136, 159, 213); // stroke: rgb($fhstpblue, 0.6); stroke: rgb(28, 135, 230); - stroke-dasharray: 2, 5; + stroke-dasharray: 0.5, 5; //altes blau rgb(102, 150, 192); } From 8257b30a6de956d162e6cf2adb941e5f309136a3 Mon Sep 17 00:00:00 2001 From: julia221501 Date: Fri, 18 Oct 2024 09:59:09 +0200 Subject: [PATCH 06/16] stroke-dasharray 3.0 --- src/components/NetworkMap.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/NetworkMap.vue b/src/components/NetworkMap.vue index 3788a1f..df51ed9 100644 --- a/src/components/NetworkMap.vue +++ b/src/components/NetworkMap.vue @@ -843,7 +843,7 @@ line.select { // stroke: rgb(136, 159, 213); // stroke: rgb($fhstpblue, 0.6); stroke: rgb(28, 135, 230); - stroke-dasharray: 0.5, 5; + stroke-dasharray: 5, 0.5; //altes blau rgb(102, 150, 192); } From d8ab7758ade89f559a563c58be441f363151c1fc Mon Sep 17 00:00:00 2001 From: julia221501 Date: Fri, 18 Oct 2024 10:02:19 +0200 Subject: [PATCH 07/16] stroke-dasharray 4.0 --- src/components/NetworkMap.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/NetworkMap.vue b/src/components/NetworkMap.vue index df51ed9..3c072ae 100644 --- a/src/components/NetworkMap.vue +++ b/src/components/NetworkMap.vue @@ -843,7 +843,7 @@ line.select { // stroke: rgb(136, 159, 213); // stroke: rgb($fhstpblue, 0.6); stroke: rgb(28, 135, 230); - stroke-dasharray: 5, 0.5; + stroke-dasharray: 5, 1; //altes blau rgb(102, 150, 192); } From 4bf6e621824d74902a9c629659df24fd75fc706f Mon Sep 17 00:00:00 2001 From: julia221501 Date: Fri, 18 Oct 2024 10:24:30 +0200 Subject: [PATCH 08/16] schatten anderes blau --- src/components/NetworkMap.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/NetworkMap.vue b/src/components/NetworkMap.vue index 3c072ae..cfd3274 100644 --- a/src/components/NetworkMap.vue +++ b/src/components/NetworkMap.vue @@ -36,8 +36,8 @@ /> - - + + From 99f1ad18e7aedaaa689a78036071d6226fcbe46a Mon Sep 17 00:00:00 2001 From: Alexander Rind <1217527+alex-rind@users.noreply.github.com> Date: Wed, 27 Nov 2024 08:17:23 +0100 Subject: [PATCH 09/16] Update README.md adapt term: egocentered instead od egocentric --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 86f5e3c..cc739b4 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # easyNWK Web This project aims to provide a modern web-based version of the easyNWK. -The easyNWK is an egocentric network visualization tool for social workers and +The easyNWK is an egocentered network visualization tool for social workers and healthcare professionals based on the book [Soziale Diagnostik](https://www.vandenhoeck-ruprecht-verlage.com/themen-entdecken/paedagogik-soziale-arbeit/soziale-arbeit/26908/soziale-diagnostik) by Peter Pantuček-Eisenbacher. From 2652845fe86097f80892c694c36347189d82100e Mon Sep 17 00:00:00 2001 From: julia221501 Date: Thu, 12 Dec 2024 13:43:23 +0100 Subject: [PATCH 10/16] Emoji size bigger --- src/components/NetworkMap.vue | 9 +++++++-- src/components/ViewOptionsPanel.vue | 22 ++++++++++++++++++++++ src/data/ViewOptions.ts | 2 ++ src/de.ts | 7 +++++-- src/en.ts | 1 + src/store/viewSettingsModule.ts | 3 +++ 6 files changed, 40 insertions(+), 4 deletions(-) diff --git a/src/components/NetworkMap.vue b/src/components/NetworkMap.vue index cfd3274..153f766 100644 --- a/src/components/NetworkMap.vue +++ b/src/components/NetworkMap.vue @@ -69,6 +69,7 @@ v-if="mark.selected" :cx="mark.x" :cy="mark.y" + :style="{ r: iconSize }" r="6" fill="url('#selected-gradient')" /> @@ -95,6 +96,7 @@ :x2="mark.x" :y2="mark.y" :filter="mark.d.edgeType == 2 ? 'url(#dilate-and-xor)' : undefined" + :style="{ size: iconSize + 'px' }" /> {{ egoEmoji }} @@ -156,7 +159,8 @@ :y="mark.y + 1" class="mark clickAble" @click.stop="clickAlter(mark.d)" - style="font-size: 4px; cursor: pointer" + style="cursor: pointer" + :style="{ 'font-size': iconSize + 'px' }" > {{ mark.d.emoji }} @@ -777,6 +781,7 @@ export default defineComponent({ alteriMarks, connectionMarks, labelSize: computed(() => store.state.view.labelSizeInNwk), + iconSize: computed(() => store.state.view.iconSizeInNwk), showAge: computed(() => store.state.view.ageInNwk), showRole: computed(() => store.state.view.roleInNwk), getRoleShort, diff --git a/src/components/ViewOptionsPanel.vue b/src/components/ViewOptionsPanel.vue index a0ccf2a..3466297 100644 --- a/src/components/ViewOptionsPanel.vue +++ b/src/components/ViewOptionsPanel.vue @@ -48,6 +48,18 @@ :disabled="!alteriNames" /> +
+ +   + +
@@ -126,6 +138,15 @@ export default defineComponent({ }, }); + const iconSize = computed({ + get(): number { + return store.state.view.labelSizeInNwk; + }, + set(value: number) { + store.commit("view/setIconSizeInNwk", value); + }, + }); + // getter & setter for checkboxes function accessFlag(flag: keyof ViewOptionsFlags) { return computed({ @@ -150,6 +171,7 @@ export default defineComponent({ showAge: accessFlag("ageInNwk"), showRole: accessFlag("roleInNwk"), textSize, + iconSize, //markSize, //changeMarkSize, }; diff --git a/src/data/ViewOptions.ts b/src/data/ViewOptions.ts index f13fdeb..d4bbb3e 100644 --- a/src/data/ViewOptions.ts +++ b/src/data/ViewOptions.ts @@ -9,6 +9,7 @@ export interface ViewOptionsFlags { export interface ViewOptions extends ViewOptionsFlags { labelSizeInNwk: number; + iconSizeInNwk: number; } export function initDefaultViewOptions(): ViewOptions { @@ -22,5 +23,6 @@ export function initDefaultViewOptions(): ViewOptions { roleInNwk: false, labelSizeInNwk: 5, + iconSizeInNwk: 5, }; } diff --git a/src/de.ts b/src/de.ts index e6cabf0..96d5a13 100644 --- a/src/de.ts +++ b/src/de.ts @@ -193,8 +193,10 @@ export default { network_without_professional_help: "Netzwerk ohne prof. Hilfe", entire_network: "gesamtes Netzwerk", lang: "de", - formaterror: "Die ausgewählte Datei entspricht nicht dem JSON oder den NWK Format.", - checkformat: "Bitte überprüfen Sie die Datei und versuchen Sie es erneut.", + formaterror: + "Die ausgewählte Datei entspricht nicht dem JSON oder den NWK Format.", + checkformat: + "Bitte überprüfen Sie die Datei und versuchen Sie es erneut.", //Karten und Verläufe: versiontitle: "Karten und Verläufe", currentversion: "Aktuelle Karte: ", @@ -209,6 +211,7 @@ export default { noemoji: "Noch kein Emoji gewählt", selectemoji: "Emoji auswählen", removeemoji: "Emoji entfernen", + changesizeEmoji: "Icon Größe: ", }, }; }, diff --git a/src/en.ts b/src/en.ts index 67c4802..1cb3ce5 100644 --- a/src/en.ts +++ b/src/en.ts @@ -207,6 +207,7 @@ export default { noemoji: "No emoji chosen yet", selectemoji: "Select emoji", removeemoji: "Remove emoji", + changesizeEmoji: "Icon size: ", }, }; }, diff --git a/src/store/viewSettingsModule.ts b/src/store/viewSettingsModule.ts index 9a506da..da733eb 100644 --- a/src/store/viewSettingsModule.ts +++ b/src/store/viewSettingsModule.ts @@ -37,6 +37,9 @@ const mutations = { setLabelSizeInNwk(state: ViewOptions, newSize: number): void { state.labelSizeInNwk = newSize; }, + setIconSizeInNwk(state: ViewOptions, newSize: number): void { + state.iconSizeInNwk = newSize; + }, }; export const viewOptionsModule = { From f0538a6fee1f9c4daff37b4e7805cdee7f18e3e1 Mon Sep 17 00:00:00 2001 From: julia221501 Date: Thu, 12 Dec 2024 14:51:26 +0100 Subject: [PATCH 11/16] =?UTF-8?q?Emoji=20Checkbox=20zu=20Button=20ge=C3=A4?= =?UTF-8?q?ndert,=20borders=20dunkler=20gemacht,=20Prof.=20Hilfe=20bei=20e?= =?UTF-8?q?nglischer=20Sprache=20=C3=BCbersetzt,=20Panels=20und=20Buttons?= =?UTF-8?q?=20dunklere=20Rahmen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/main.scss | 18 +++++++++++++++--- src/components/EgoHeader.vue | 2 +- src/components/ViewOptionsPanel.vue | 24 +++++++++++++++++------- src/data/AlterCategories.ts | 2 +- src/de.ts | 9 ++++++--- src/en.ts | 3 ++- src/main.ts | 4 +++- 7 files changed, 45 insertions(+), 17 deletions(-) diff --git a/src/assets/main.scss b/src/assets/main.scss index 2eb2dbe..6d55026 100644 --- a/src/assets/main.scss +++ b/src/assets/main.scss @@ -39,9 +39,9 @@ $panel-shadow: none; .panel-block, .panel-heading, .panel-tabs { - border-bottom: 1px solid #dbdbdb; - border-left: 1px solid #dbdbdb; - border-right: 1px solid #dbdbdb; + border-bottom: 1px solid #C6C6C6; + border-left: 1px solid #C6C6C6; + border-right: 1px solid #C6C6C6; } // equal height with or without large icon @@ -54,3 +54,15 @@ $panel-shadow: none; .clickAble { cursor: pointer; } + +.textarea, +.input, +.button { + border: 1.5px solid #aaa; +} + +.select { + border: 1.5px solid #aaa; + border-radius: 4px; +} + diff --git a/src/components/EgoHeader.vue b/src/components/EgoHeader.vue index d590b07..b240bf7 100644 --- a/src/components/EgoHeader.vue +++ b/src/components/EgoHeader.vue @@ -51,7 +51,7 @@ export default defineComponent({ #ego { display: flex; align-items: center; - color: black + color: black; } #ego > :last-child { diff --git a/src/components/ViewOptionsPanel.vue b/src/components/ViewOptionsPanel.vue index a0ccf2a..8336d97 100644 --- a/src/components/ViewOptionsPanel.vue +++ b/src/components/ViewOptionsPanel.vue @@ -62,22 +62,27 @@ {{ t("connectionson") }}
-
- -
- +
@@ -142,6 +147,11 @@ export default defineComponent({ return { pseudonyms: computed(() => store.state.pseudonym.active), togglePseudonyms: () => store.commit("pseudonym/toggle"), + toggleEmoji: () => + store.commit("view/updateFlag", { + flag: "emoji", + value: !store.state.view.emoji, + }), horizons: accessFlag("horizons"), connections: accessFlag("connections"), emoji: accessFlag("emoji"), diff --git a/src/data/AlterCategories.ts b/src/data/AlterCategories.ts index 46bc83b..55d3257 100644 --- a/src/data/AlterCategories.ts +++ b/src/data/AlterCategories.ts @@ -25,7 +25,7 @@ export const CATEGORY_TRANSLATIONS: Record> = { // de: "Kreis 3 + 2 + 1", // en: "Circle 3 + 2 + 1", // }, - "prof. Hilfe": { + "Prof. Hilfe": { de: "Prof. Hilfe", en: "Professional Help", }, diff --git a/src/de.ts b/src/de.ts index e6cabf0..a9310bb 100644 --- a/src/de.ts +++ b/src/de.ts @@ -78,7 +78,8 @@ export default { anonymiseon: "Anonymisieren", horizonson: "Horizonte", connectionson: "Verbindungen", - emojion: "Emojis", + emojion: "Emojis anzeigen", + emojioff: "Emojis ausblenden", namesofcontactson: "Beschriftung der Kontakte", ageofcontactson: "zusätzlich: Alter (Jahre)", roleofcontactson: "zusätzlich: Rolle der Kontakte", @@ -193,8 +194,10 @@ export default { network_without_professional_help: "Netzwerk ohne prof. Hilfe", entire_network: "gesamtes Netzwerk", lang: "de", - formaterror: "Die ausgewählte Datei entspricht nicht dem JSON oder den NWK Format.", - checkformat: "Bitte überprüfen Sie die Datei und versuchen Sie es erneut.", + formaterror: + "Die ausgewählte Datei entspricht nicht dem JSON oder den NWK Format.", + checkformat: + "Bitte überprüfen Sie die Datei und versuchen Sie es erneut.", //Karten und Verläufe: versiontitle: "Karten und Verläufe", currentversion: "Aktuelle Karte: ", diff --git a/src/en.ts b/src/en.ts index 67c4802..d4f74f9 100644 --- a/src/en.ts +++ b/src/en.ts @@ -77,7 +77,8 @@ export default { anonymiseon: "Anonymise", horizonson: "Horizons", connectionson: "Connections", - emojion: "Emojis", + emojion: "Shoe emojis", + emojioff: "Hide emojis", namesofcontactson: "Labels for contacts", ageofcontactson: "Age of contacts", roleofcontactson: "Role of contacts", diff --git a/src/main.ts b/src/main.ts index db2e1cb..6056abb 100644 --- a/src/main.ts +++ b/src/main.ts @@ -53,6 +53,7 @@ import { faUnlink, faArrowsAlt, faCopy, + faIcons, } from "@fortawesome/free-solid-svg-icons"; library.add( faBars, @@ -96,7 +97,8 @@ library.add( faInfo, faLink, faUnlink, - faArrowsAlt + faArrowsAlt, + faIcons ); // Vue.component("font-awesome-icon", FontAwesomeIcon); From 6fc9dbcbbc85fcfc250fac3a9414a3579b58c341 Mon Sep 17 00:00:00 2001 From: julia221501 Date: Fri, 13 Dec 2024 13:09:48 +0100 Subject: [PATCH 12/16] =?UTF-8?q?Slider=20erstellt=20um=20die=20Gr=C3=B6?= =?UTF-8?q?=C3=9Fe=20der=20Emojis=20und=20Marks=20zu=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/NetworkMap.vue | 11 +++++------ src/components/ViewOptionsPanel.vue | 8 ++++---- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/components/NetworkMap.vue b/src/components/NetworkMap.vue index 153f766..2cd2220 100644 --- a/src/components/NetworkMap.vue +++ b/src/components/NetworkMap.vue @@ -69,8 +69,7 @@ v-if="mark.selected" :cx="mark.x" :cy="mark.y" - :style="{ r: iconSize }" - r="6" + :r="iconSize" fill="url('#selected-gradient')" /> @@ -133,8 +132,8 @@ :x="egoCoords[0]" :y="egoCoords[1]" class="mark" - width="4" - height="4" + :width="iconSize" + :height="iconSize" transform="translate(-2,-2)" v-if="!emoji || !egoEmoji" /> @@ -172,8 +171,8 @@ :x="mark.x" :y="mark.y" class="mark clickAble" - width="4" - height="4" + :width="iconSize" + :height="iconSize" transform="translate(-2,-2)" @click.stop="clickAlter(mark.d)" /> diff --git a/src/components/ViewOptionsPanel.vue b/src/components/ViewOptionsPanel.vue index 3466297..2f15609 100644 --- a/src/components/ViewOptionsPanel.vue +++ b/src/components/ViewOptionsPanel.vue @@ -42,7 +42,7 @@ @@ -140,7 +140,7 @@ export default defineComponent({ const iconSize = computed({ get(): number { - return store.state.view.labelSizeInNwk; + return store.state.view.iconSizeInNwk; }, set(value: number) { store.commit("view/setIconSizeInNwk", value); From b2506d87b066ef0f75a1e4a74a29fd14d99a6922 Mon Sep 17 00:00:00 2001 From: Alexander Rind <1217527+alex-rind@users.noreply.github.com> Date: Fri, 13 Dec 2024 15:45:11 +0100 Subject: [PATCH 13/16] fix typo --- src/assets/main.scss | 9 ++------- src/en.ts | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/src/assets/main.scss b/src/assets/main.scss index 6d55026..2dfe1a4 100644 --- a/src/assets/main.scss +++ b/src/assets/main.scss @@ -57,12 +57,7 @@ $panel-shadow: none; .textarea, .input, +.select select, .button { - border: 1.5px solid #aaa; + border-color: #aaa; } - -.select { - border: 1.5px solid #aaa; - border-radius: 4px; -} - diff --git a/src/en.ts b/src/en.ts index d4f74f9..16e6244 100644 --- a/src/en.ts +++ b/src/en.ts @@ -77,7 +77,7 @@ export default { anonymiseon: "Anonymise", horizonson: "Horizons", connectionson: "Connections", - emojion: "Shoe emojis", + emojion: "Show emojis", emojioff: "Hide emojis", namesofcontactson: "Labels for contacts", ageofcontactson: "Age of contacts", From 3231b5f40aa493ad0084253c6afa16b93bc68c61 Mon Sep 17 00:00:00 2001 From: Alexander Rind <1217527+alex-rind@users.noreply.github.com> Date: Fri, 13 Dec 2024 17:18:10 +0100 Subject: [PATCH 14/16] bugfixes & adjustments icon size slider * gradient shadow larger * grow icon around its position * icon size slider independet of labels * cold start from localstorage with partial missing view settings * adjust default sizes and boundaries --- src/components/NetworkMap.vue | 13 +++++++++---- src/components/ViewOptionsPanel.vue | 7 +++---- src/data/ViewOptions.ts | 2 +- src/store/localStoragePlugin.ts | 2 +- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/components/NetworkMap.vue b/src/components/NetworkMap.vue index 2cd2220..5a10740 100644 --- a/src/components/NetworkMap.vue +++ b/src/components/NetworkMap.vue @@ -69,7 +69,7 @@ v-if="mark.selected" :cx="mark.x" :cy="mark.y" - :r="iconSize" + :r="iconSize * 1.5" fill="url('#selected-gradient')" /> @@ -95,7 +95,6 @@ :x2="mark.x" :y2="mark.y" :filter="mark.d.edgeType == 2 ? 'url(#dilate-and-xor)' : undefined" - :style="{ size: iconSize + 'px' }" /> @@ -781,6 +780,12 @@ export default defineComponent({ connectionMarks, labelSize: computed(() => store.state.view.labelSizeInNwk), iconSize: computed(() => store.state.view.iconSizeInNwk), + iconTranslate: computed( + () => + `translate(${store.state.view.iconSizeInNwk / -2},${ + store.state.view.iconSizeInNwk / -2 + })` + ), showAge: computed(() => store.state.view.ageInNwk), showRole: computed(() => store.state.view.roleInNwk), getRoleShort, diff --git a/src/components/ViewOptionsPanel.vue b/src/components/ViewOptionsPanel.vue index 2f15609..406936f 100644 --- a/src/components/ViewOptionsPanel.vue +++ b/src/components/ViewOptionsPanel.vue @@ -42,7 +42,7 @@ diff --git a/src/data/ViewOptions.ts b/src/data/ViewOptions.ts index d4bbb3e..dac7b7a 100644 --- a/src/data/ViewOptions.ts +++ b/src/data/ViewOptions.ts @@ -23,6 +23,6 @@ export function initDefaultViewOptions(): ViewOptions { roleInNwk: false, labelSizeInNwk: 5, - iconSizeInNwk: 5, + iconSizeInNwk: 4, }; } diff --git a/src/store/localStoragePlugin.ts b/src/store/localStoragePlugin.ts index d5da76f..3ca6ed5 100644 --- a/src/store/localStoragePlugin.ts +++ b/src/store/localStoragePlugin.ts @@ -43,7 +43,7 @@ export function loadNWKRecordStateFromStore(): string { export function loadViewSettingsFromStore(): ViewOptions { const storedViewSettings = localStorage.getItem(STORAGE_KEY_VIEW); if (storedViewSettings && storedViewSettings != "undefined") { - return JSON.parse(storedViewSettings); + return { ...initDefaultViewOptions(), ...JSON.parse(storedViewSettings) }; } else { return initDefaultViewOptions(); } From 75c0774fac4193e34eec701b3aa216837cf0ae1c Mon Sep 17 00:00:00 2001 From: Alexander Rind <1217527+alex-rind@users.noreply.github.com> Date: Fri, 13 Dec 2024 21:10:52 +0100 Subject: [PATCH 15/16] scale emoji around their center, adjust offset of label based on iconSize --- src/components/NetworkMap.vue | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/components/NetworkMap.vue b/src/components/NetworkMap.vue index 5a10740..25fc646 100644 --- a/src/components/NetworkMap.vue +++ b/src/components/NetworkMap.vue @@ -104,7 +104,7 @@ :x="mark.x" :y="mark.y" :text-anchor="mark.x < 0 ? 'end' : 'start'" - :dx="mark.x < 0 ? -3 : 3" + :dx="mark.x < 0 ? -0.7 * iconSize : 0.7 * iconSize" :dy="mark.y < 0 ? -1 : 4" > {{ mark.label }} @@ -117,7 +117,7 @@ :x="mark.x" :y="mark.y" :text-anchor="mark.x < 0 ? 'end' : 'start'" - :dx="mark.x < 0 ? -3 : 3" + :dx="mark.x < 0 ? -0.7 * iconSize : 0.7 * iconSize" :dy="mark.y < 0 ? -1 : 4" > {{ mark.label }} @@ -139,9 +139,9 @@ {{ egoEmoji }} @@ -153,11 +153,10 @@