AstroDraw / AstroChart

A free and open-source TypeScript library for generating SVG charts to display planets in astrology.
https://astrodraw.github.io
MIT License
200 stars 51 forks source link

Feature/dynamic icons #12

Closed aclemons142 closed 2 years ago

aclemons142 commented 2 years ago

Allows for custom SVG icons to be used in place of the built in ones.

  1. Place 50x50 SVG icons in a web accessible path
  2. During initialization pass the path to the appropriate sign, e.g. SYMBOL_SUN_ICON = "\path\to\icon.svg"
aclemons142 commented 2 years ago

@afucher My bad. Removed the /build files and hopefully fixed the issue with the svg.js. I think I was using a different line ending.

Update: Hmm looks like the svg.js file remains. Let me try something else.

chelsninja commented 2 years ago

@aclemons142 @afucher — How's this going?

chelsninja commented 2 years ago

Happy New Year Guys. Is this PR ready to be merged? @aclemons142 @afucher

afucher commented 2 years ago

Hey all, sorry for the huge delay .. my first daughter was born, so things get a little bit crazy here! I'll take a look into this PR this week

chelsninja commented 2 years ago

@afucher @aclemons142 — I see that this solution requires a path to the SVG. How much more work would need to be done to support a CDN link instead? For my setup, the path is not to an internal directory.

afucher commented 2 years ago

@afucher My bad. Removed the /build files and hopefully fixed the issue with the svg.js. I think I was using a different line ending.

Update: Hmm looks like the svg.js file remains. Let me try something else.

Hey @aclemons142 do you have any update on svg.jsfile? it still with a tons of changes on it

afucher commented 2 years ago

@afucher @aclemons142 — I see that this solution requires a path to the SVG. How much more work would need to be done to support a CDN link instead? For my setup, the path is not to an internal directory.

@aclemons142 can you answer this please?

aclemons142 commented 2 years ago

Yeah, I think there was an issue wherein the entirety of the svg.js file was changed because of line endings or tabs or something.

I’ll try to take a closer look.

On Wed, Mar 23, 2022 at 8:08 PM Arthur Fücher @.***> wrote:

@afucher https://github.com/afucher @aclemons142 https://github.com/aclemons142 — I see that this solution requires a path to the SVG. How much more work would need to be done to support a CDN link instead? For my setup, the path is not to an internal directory.

@aclemons142 https://github.com/aclemons142 can you answer this please?

— Reply to this email directly, view it on GitHub https://github.com/AstroDraw/AstroChart/pull/12#issuecomment-1076936623, or unsubscribe https://github.com/notifications/unsubscribe-auth/AC7JV7KNIQYRUTHH4IDYSVDVBOW6NANCNFSM5HPW23ZA . You are receiving this because you were mentioned.Message ID: @.***>

-- Alex Clemons | www.aclemons.com | @.***

afucher commented 2 years ago

I made a POC with a possible solution and add it to the original issue (#5) , can you please take a look?

afucher commented 2 years ago

Closing this PR since the release introduce this feature (https://github.com/AstroDraw/AstroChart/releases/tag/v2.2.0)