nliautaud / gedcom-svg-fanchart

Create a SVG genealogical fan chart from a GEDCOM file.
https://nliautaud.github.io/gedcom-svg-fanchart/
MIT License
16 stars 2 forks source link

Doesn't work coloing any more #13

Closed Izabella06 closed 2 months ago

Izabella06 commented 2 months ago

Something has happened, because doesn't work global coloing any more.

grsmith26 commented 2 months ago

Yes... colors seem stuck on: .SEX_m path { fill: #ccc; } .SEX_f path { fill: #eee; } Chrome Version 128.0.6613.138 (Official Build) (64-bit) GEDCOM is from Ancestry. All else about the generated SVG seems correct.

Izabella06 commented 2 months ago

I think chroma.min.js is missing.

grsmith26 commented 2 months ago

Yes. The call to: https://cdn.rawgit.com/gka/chroma.js/master/chroma.min.js Seems to end up here: https://cdn.jsdelivr.net/gh/gka/chroma.js@master/chroma.min.js And reports: Couldn't find the requested file /chroma.min.js in gka/chroma.js

Maybe just pathing? The chroma.js project is out there. https://cdnjs.com/libraries/chroma-js

grsmith26 commented 2 months ago

Thank you for that lead! Replacing line 208: importScripts('https://cdn.rawgit.com/gka/chroma.js/master/chroma.min.js'); With this: importScripts('https://unpkg.com/chroma-js@2.0.3/chroma.min.js'); ...seems to restore color functionality (though I've barely tested) Also... I have no idea what version of chroma.min.js was intended for use by the author of gedcom-svg-fanchart

nliautaud commented 2 months ago

Hey, thanks for reporting and investigating the issue. The last chroma version at the time (eight years ago !) was around 1.2. Not extensively tested neither, but it should be ok to target 2.4.2 (from 2.5 chrome seems to implement cjs modules and won't work as is).

https://unpkg.com/chroma-js@2.4.2/chroma.min.js

@grsmith26 do you want to submit the fix ?

grsmith26 commented 2 months ago

Great. Um, I confess being unfamiliar with gitub, So, probably better left in your hands. Thanks!