From f473d6884c20ab2a8c30ce285098e070a8167064 Mon Sep 17 00:00:00 2001 From: thekingofcity <3353040+thekingofcity@users.noreply.github.com> Date: Sun, 3 Dec 2023 15:37:36 +0800 Subject: [PATCH 1/5] #511 Fix mtr fonts color --- public/styles/fonts_mtr.css | 2 -- src/components/svgs/stations/mtr.tsx | 2 ++ src/util/download.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/public/styles/fonts_mtr.css b/public/styles/fonts_mtr.css index afcb237c8..bb9623e31 100644 --- a/public/styles/fonts_mtr.css +++ b/public/styles/fonts_mtr.css @@ -2,10 +2,8 @@ .rmp-name__mtr__zh { font-family: Vegur, Helvetica, 'GenYoMin TW', HiraMinProN-W6, serif; - fill: #001f50; } .rmp-name__mtr__en { font-family: Myriad Pro, Vegur, Helvetica, sans-serif; - fill: #001f50; font-weight: bold; } diff --git a/src/components/svgs/stations/mtr.tsx b/src/components/svgs/stations/mtr.tsx index 7db4d2906..8d62d40c0 100644 --- a/src/components/svgs/stations/mtr.tsx +++ b/src/components/svgs/stations/mtr.tsx @@ -136,6 +136,7 @@ const MTRStation = (props: StationComponentProps) => { lineHeight={10} grow="up" baseOffset={1} + fill="#001f50" className="rmp-name__mtr__zh" /> { lineHeight={7.5} grow="down" baseOffset={1} + fill="#001f50" className="rmp-name__mtr__en" /> diff --git a/src/util/download.ts b/src/util/download.ts index f6ceda255..49c42838e 100644 --- a/src/util/download.ts +++ b/src/util/download.ts @@ -57,8 +57,8 @@ export const makeImages = async ( Object.entries({ '.rmp-name__zh': ['font-family'], '.rmp-name__en': ['font-family'], - '.rmp-name__mtr__zh': ['font-family', 'fill'], - '.rmp-name__mtr__en': ['font-family', 'fill'], + '.rmp-name__mtr__zh': ['font-family'], + '.rmp-name__mtr__en': ['font-family', 'font-weight'], '.rmp-name__berlin': ['font-family'], '.rmp-name-outline': ['paint-order', 'stroke', 'stroke-width', 'stroke-linejoin'], }).forEach(([className, styleSet]) => { From bb0b33f375ac037cb61ffa67bc232be482be1d06 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 3 Dec 2023 07:40:48 +0000 Subject: [PATCH 2/5] rmp-3.3.30 release --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3ff7d5c86..5bbff85c6 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rmp", - "version": "3.3.29", + "version": "3.3.30", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "rmp", - "version": "3.3.29", + "version": "3.3.30", "license": "GPL-3.0-only", "dependencies": { "@chakra-ui/react": "^2.7.1", diff --git a/package.json b/package.json index a0fb66cbc..9dc46f8bf 100644 --- a/package.json +++ b/package.json @@ -78,5 +78,5 @@ "last 1 safari version" ] }, - "version": "3.3.29" + "version": "3.3.30" } From a9481447768432e560e22e7de80e9c207e8a2efc Mon Sep 17 00:00:00 2001 From: 5+1 <59787082+langonginc@users.noreply.github.com> Date: Sun, 3 Dec 2023 18:02:26 +0800 Subject: [PATCH 3/5] #524 Fix multi selection info crashed (#525) --- src/components/panels/details/info-multiple-selection.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/panels/details/info-multiple-selection.tsx b/src/components/panels/details/info-multiple-selection.tsx index 2c49879b0..6a37be68e 100644 --- a/src/components/panels/details/info-multiple-selection.tsx +++ b/src/components/panels/details/info-multiple-selection.tsx @@ -23,6 +23,7 @@ export default function InfoMultipleSection() { {selected.map(node => { + if (!node.startsWith('stn') && !node.startsWith('misc_node')) return; const attr = graph.current.getNodeAttributes(node); const type = attr.type; const value = node.startsWith('stn') ? (attr[type] as StationAttributes).names.join('/') : type; From 7ae39ca534775bf56d778080bff215be00a83e12 Mon Sep 17 00:00:00 2001 From: thekingofcity <3353040+thekingofcity@users.noreply.github.com> Date: Sun, 3 Dec 2023 18:06:36 +0800 Subject: [PATCH 4/5] #529 Polyfill `paint-order` for SVG 1.1 --- src/util/download.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/util/download.ts b/src/util/download.ts index 49c42838e..970e3be26 100644 --- a/src/util/download.ts +++ b/src/util/download.ts @@ -66,6 +66,12 @@ export const makeImages = async ( if (e === null) return; // no element in the canvas uses this class const style = window.getComputedStyle(e); elem.querySelectorAll(className).forEach(el => { + // Polyfill paint-order used in .rmp-name-outline for Adobe Illustrator. + // This is an SVG 2 specification and SVG 2 is not finalized or released yet. + // https://www.w3.org/TR/SVG2/painting.html#PaintOrder + if (className === '.rmp-name-outline') + el.insertAdjacentElement('afterend', el.cloneNode(true) as SVGElement); + styleSet.forEach(styleName => { el.setAttribute(styleName, style.getPropertyValue(styleName)); }); From d7f03cc7910e87f485a2697e1b58d9425d6e0ae9 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sun, 3 Dec 2023 13:43:43 +0000 Subject: [PATCH 5/5] rmp-3.3.31 release --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 5bbff85c6..bf7b1e7f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "rmp", - "version": "3.3.30", + "version": "3.3.31", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "rmp", - "version": "3.3.30", + "version": "3.3.31", "license": "GPL-3.0-only", "dependencies": { "@chakra-ui/react": "^2.7.1", diff --git a/package.json b/package.json index 9dc46f8bf..57c1fd8ce 100644 --- a/package.json +++ b/package.json @@ -78,5 +78,5 @@ "last 1 safari version" ] }, - "version": "3.3.30" + "version": "3.3.31" }