Git Product home page Git Product logo

react-svg-path's Introduction

joemaddalone.com

Source code for joemaddalone.com

react-svg-path's People

Contributors

bobcat49 avatar dependabot[bot] avatar joemaddalone avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

marijusar

react-svg-path's Issues

View config getter callback for component `path` must be a function.

View config getter callback for component path must be a function (received undefined). Make sure to start component names with a capital letter.

Also getting following.

Property 'TextEncoder' doesn't exist.

Iphone 13 Pro, iOS 17.0, Simulator, (React-Native<-Probably This)

Attribute pollution

Nesting functionality is sometimes resulting in attributes that don't belong on a path element. Things like ox, oy, sx, sy, cx, and cy are bleeding into the elements as attributes. This isn't hurting anything, but it looks gross. Use the props as needed for various calculation and then strip them out before rendering as attributes.

Malformed path when using PathMerge with Path objects

It looks like using PathMerge with Path object is not supported and produces a malformed output:

Input

<PathMerge>
    <PathOne />
    <PathTwo />
</PathMerge>

Actual output

<path d="<path d=&quot;M201.337···&quot; merge></path><path d=&quot;M30.4869 ···&quot; merge></path>" />

Expected output

<path d="M201.337··· M30.4869 ···" />

Do you have plans to support this kind of operation?

Typescript definition.

You have typescript definition for 'svg-path' library, but it is missed for 'react-svg-path'. Or maybe I doing something wrong

relative change when nesting

Introduce an x and y (need to be named) props for altering an cx/sx & cy/sy position relative to the inherited value.

<Parent cx={100} cy={100}>
  <Child adjustX={-25} adjustY={25} /> // x is adjusted by -25 (100-25=75), y is adjusted by +25 (100+25=125)
</Parent>

Proposed names:

  • ax & ay (adjusted x & y)
  • ox & oy (offset x & y)
  • ...

Using this in React Typescript

While using this library in react typescript, i was not able to import any of the modules.
I am getting the error:

Could not find a declaration file for module 'react-svg-path'. node_modules/react-svg-path/dist/index.cjs.js' implicitly has an 'any' type.
Try npm i --save-dev @types/react-svg-path if it exists or add a new declaration (.d.ts) file containing declare module 'react-svg-path

Is there any other method to install this or do i have to exclude this module from tsconfig file?

Include svg-path-properties

I've found some use cases where it would be nice to have the ability of calculating the total lenght of a path in-situ. Have you considered the option of using svg-path-properties under the hood to offer this kind of functionality?

By the way: this awesome project saved me a lot of headaches, thank you very much!

Dimension component from Football field demo

The dimension component in the Football demo could be a standalone component included in the library. If a string value is not passed in it could automatically use the pixel length of the line as the value. Length functionality might be a nice addition to underlying path lib and then utilized here.

Provide user help with layer ordering

Specifically in nesting scenarios the order or layers should be controllable with minimal effort.

<Parent order={3}>
   <Child1 order={2} />
   <Child2 order={1}>
       <Child2-1 order={0} />
   </Child2>
</Parent>

without the ordering this would render

<parent-path />
<child-1-path />
<child-2-path />
<child-2-1-path />

with ordering we would get

<child-2-1-path />
<child-2-path />
<child-1-path />
<parent-path />

This may be trickier than it seems, but should be possible and would solve a real pain point in svg composition. From a holistic approach if this were introduced for everything inside of <Svg /> it could prove very powerful - it could also mean inventing a v-dom for svg though...

The automated release is failing 🚨

🚨 The automated release from the master branch failed. 🚨

I recommend you give this issue a high priority, so other packages depending on you could benefit from your bug fixes and new features.

You can find below the list of errors reported by semantic-release. Each one of them has to be resolved in order to automatically publish your package. I’m sure you can resolve this 💪.

Errors are usually caused by a misconfiguration or an authentication problem. With each error reported below you will find explanation and guidance to help you to resolve it.

Once all the errors are resolved, semantic-release will release your package the next time you push a commit to the master branch. You can also manually restart the failed CI job that runs semantic-release.

If you are not sure how to resolve this, here is some links that can help you:

If those don’t help, or if this issue is reporting something you think isn’t right, you can always ask the humans behind semantic-release.


No npm token specified.

An npm token must be created and set in the NPM_TOKEN environment variable on your CI environment.

Please make sure to create an npm token and to set it in the NPM_TOKEN environment variable on your CI environment. The token must allow to publish to the registry https://registry.npmjs.org/.


Good luck with your project ✨

Your semantic-release bot 📦🚀

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.