Git Product home page Git Product logo

Comments (9)

thednp avatar thednp commented on June 11, 2024 1

I see, so you need to have all path commands (as well as all segment types) exported to global namespace?

from svg-path-commander.

thednp avatar thednp commented on June 11, 2024

I don't understand, can you elaborate and provide some test?

UPDATE: Yes, some path commands types aren't exported, they're there to build the others.

What is your suggestion please?

from svg-path-commander.

jglee96 avatar jglee96 commented on June 11, 2024

Sorry to not enough explanation and my language skill.
I want to change my code like this:

const type = pathCommand[0];
switch (type) {
  case 'M' {
  ////
  }
  case 'L' {
  ////
  }
}

->

const type = pathCommand[0];
switch (type) {
  case MCommand {
  ////
  }
  case LCommand {
  ////
  }
}

from svg-path-commander.

jglee96 avatar jglee96 commented on June 11, 2024

Yes, That's What I mean.

from svg-path-commander.

thednp avatar thednp commented on June 11, 2024

Will have it done with the next update.

from svg-path-commander.

thednp avatar thednp commented on June 11, 2024

How is the TypeScript definition with SVGPathCommander? How would you rate it so far? (I'm new to TS myself)

from svg-path-commander.

jglee96 avatar jglee96 commented on June 11, 2024

Recently I've been lookig for SVG Path processing tool.
I think SVGPathCommander is the best with TS. Others are hard to use with TS because of insufficient type declaration.

from svg-path-commander.

thednp avatar thednp commented on June 11, 2024

Oh thanks!

If you don't mind can you share what you're doing? I might have a better solution or I may get more insight on what TypeScript definitions might need.

from svg-path-commander.

jglee96 avatar jglee96 commented on June 11, 2024

I try to search each verb of SVG Path and edit points.
Then we can be provided the services that make new shape from original shape.
I'm sorry, but I can't tell you any more details because it's a team job.

from svg-path-commander.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.