brunofenzl / svg-round-corners Goto Github PK
View Code? Open in Web Editor NEWLittle utility to round corners in a path
License: MIT License
Little utility to round corners in a path
License: MIT License
svg-round-corners/tests/utils.spec.js
Line 18 in 9a895a0
Could be a lodash cloneDeep
removed(not used) or at least replaced with https://developer.mozilla.org/en-US/docs/Web/API/structuredClone, so the lodash can be removed from deps ?
Thank you for this awesome lib!
Is it possible to publish the latest version of the package to NPM? There have been important fixes since 0.2.0
In a project I am working on I get an array of points with different radiuses for each point(corner). I forked this repository and made the changed (one line) that work for me.
The problem is, this solution lacks the following:
Looking forward to your opinion.
Sorry, I know it's not an issue but I just wanted to say this little utility has just saved me hours of time and made my code way simpler! Great work :)
Can you add a license file? Is this MIT? Public Domain? Something else?
It is common to use svgs as clipping paths for images, and to set clipPathUnits
to objectBoundingBox
which remaps anything within normalized space (0-1) to the boundary of the element.
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/clipPathUnits
Because of this small normalized space, two points that would normally be seen as pixels apart, are now subpixels apart in svg land and get marked as overlapping by the Math.round
function.
https://github.com/BrunoFenzl/svg-round-corners/blob/master/lib/utils.js#L314
What probably could be done is to match the precision of the roundValues
function by reusing the round
argument
Thanks for the great package!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.