Comments (9)
I see, so you need to have all path commands (as well as all segment types) exported to global namespace?
from svg-path-commander.
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.
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.
Yes, That's What I mean.
from svg-path-commander.
Will have it done with the next update.
from svg-path-commander.
How is the TypeScript definition with SVGPathCommander? How would you rate it so far? (I'm new to TS myself)
from svg-path-commander.
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.
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.
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)
- A module cannot have multiple default exports HOT 2
- Inverted "flipX()" and "flipY()" HOT 9
- Code Review HOT 6
- Unsupported implicit `lineTo` when using additional `moveTo` parameters HOT 6
- Transforms on g elements HOT 9
- path2Curve produces wrong result when converting L command HOT 8
- Support custom `document` on `shapeToPath`
- How to apply 4x4 matrix using SVG path commander HOT 2
- Subdividing paths/curves? HOT 2
- Scale transform doesn't take into consideration the origin property HOT 5
- README logo is hard to see in dark mode HOT 3
- About the lineToCubic algorithm. HOT 2
- Unable to import and use default export in vite/sveltekit HOT 6
- shapeToPath can't infer RectAttr type as param HOT 4
- can shapeToPath return a PathArray or SVGPathCommander? HOT 3
- SVGPathCommander.transform() return the path that has 'NaN' HOT 3
- Feature Request clostestPoint & segmentOfPoint HOT 15
- Trim string before converting shape to path HOT 1
- flipX - origin is not iterable: Related to using in Vue 3 component? HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from svg-path-commander.