diff --git a/index.html b/index.html index 3f6bc4f..3dac88d 100644 --- a/index.html +++ b/index.html @@ -2,9 +2,9 @@ - + - Metro Map Maker + Line Metro Map
diff --git a/public/logo.png b/public/logo.png new file mode 100644 index 0000000..56c8319 Binary files /dev/null and b/public/logo.png differ diff --git a/public/vite.svg b/public/vite.svg deleted file mode 100644 index e7b8dfb..0000000 --- a/public/vite.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index cdcd407..ffd1e5d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -44,6 +44,26 @@ onMounted(() => { build(); }) +function exportFile() { + build(); + + const svg = document.querySelector('svg') + + const serializer = new XMLSerializer(); + let source = serializer.serializeToString(svg); + let url = "data:image/svg+xml;charset=utf-8,"+encodeURIComponent(source); + + let element = document.createElement('a'); + element.setAttribute('href', url); + element.setAttribute('download', 'metroMap.svg'); + + element.style.display = 'none'; + document.body.appendChild(element); + + element.click(); + document.body.removeChild(element); +} + function importFile() { let element = document.getElementById('fileInput'); element.click(); @@ -135,7 +155,7 @@ function build () {
Импорт - Экспорт + Экспорт Сохранить Предпросмотр diff --git a/src/assets/NTSomic-Bold.ttf b/src/assets/NTSomic-Bold.ttf deleted file mode 100644 index 4c597f6..0000000 Binary files a/src/assets/NTSomic-Bold.ttf and /dev/null differ diff --git a/src/assets/vue.svg b/src/assets/vue.svg deleted file mode 100644 index 770e9d3..0000000 --- a/src/assets/vue.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/components/StationsTable.vue b/src/components/StationsTable.vue index aeededf..70a0456 100644 --- a/src/components/StationsTable.vue +++ b/src/components/StationsTable.vue @@ -19,7 +19,6 @@ const store = useStore() {{ store.stations[i - 1].name }} {{ store.stations[i - 1].step }} diff --git a/src/models/map.ts b/src/models/map.ts index 7e73157..9d68701 100644 --- a/src/models/map.ts +++ b/src/models/map.ts @@ -61,7 +61,7 @@ export class Map implements MetroMap { let naming = this.draw.text(stations[i].name).fill('black').font({ size: 25}); naming.cx(cx + 30 + (naming.bbox().width / 2)).cy(cy); naming.font({ - family: 'NTSomic', + family: 'Onest', weight: '750', leading: 1 }) @@ -86,7 +86,7 @@ export class Map implements MetroMap { let text = this.draw.text(stations[i].name).font({ size: 35}).cx(last + stations[i].step).cy(textPosition); text.font({ - family: 'NTSomic', + family: 'Onest', weight: '750', }) } @@ -99,6 +99,9 @@ export class Map implements MetroMap { this.draw = this.draw.size(this.settings.width, this.yMax * 2); this.draw.clear(); + // @ts-ignore + this.draw.style("@import url('https://fonts.googleapis.com/css2?family=Onest:wght@100..900&family=Roboto+Mono:ital,wght@0,100..700;1,100..700&display=swap')") + this.draw.circle(50).fill(this.branch.color).cx(50).cy(50) let text = this.draw.text(this.branch.number.toString()).font({ size: 35}).fill('#fff').cx(50).cy(50); @@ -110,7 +113,7 @@ export class Map implements MetroMap { let naming = this.draw.text(this.branch.name).font({ size: 35}); naming.cx(90 + (naming.bbox().width / 2)).cy(50); naming.font({ - family: 'NTSomic', + family: 'Onest', weight: '750', })