Code Monkey home page Code Monkey logo

donutty's People

Contributors

dependabot[bot] avatar i-grou avatar kukac7 avatar simeydotme avatar tobie 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

donutty's Issues

responsive radius

You mention that the radius can be set to responsive using css. What value needs to be set to make this work?

Make SVG accessible

Hey, thanks for creating Donutty. Really helpful.

I just wanted to bring this to your attention. It would be great if SVGs were accessible. Here's a link to making inline SVGs accessible.

Basically, it would be helpful if there was another option "title" which would be added inside SVG as the first child of its parent as a <title> tag with a unique ID. Then, <svg> would also get aria-labelledby with the unique ID and also role="img".

Although not necessary, it would also be helpful if <desc> was added too. The article explains all of this.

Thanks a lot!

Weird SVG display issues in Firefox

Just thought I'd document some strange display issues on Firefox I ran into. The SVG donut wasn't displaying properly (like it was not fully rendering or being clipped).

Screen recording:

firefox

Issue found in Firefox 91, worked ok in other browsers I tested.

It seems related to the transform attribute on the SVG element.

Overriding the transform attribute by setting transform: scale(1) on the svg (via my CSS) fixed the issue. Strangely setting transform: none didn't work.

P.s I was able to replicate the issue somewhat in the codepen demo (didn't occur as often or as badly):

image

safari rotate bug

in safari, svg's are rotated.
in chrome ok.

each is the latest version.

Screenshot 2021-12-03 at 22 39 39

Cannot read property 'style' of undefined

When using donutty.js (without jquery) any attempt to initialize donutty will throw an error:

Uncaught TypeError: Cannot read property 'style' of undefined
at win.Donutty.donutty.animate (donutty.js:235)
at win.Donutty.donutty.insertFragments (donutty.js:186)
at win.Donutty.donutty.init (donutty.js:78)
at new win.Donutty (donutty.js:59)
at donutty.js:348
at NodeList.forEach ()
at HTMLDocument.initialise (donutty.js:345)

Even very basic example <div data-donutty></div> will fail.

It's related to the text option, which is always false somehow in that script.
Could that be fixed? You may have a look at my fixed version of donutty.js here: https://www.diffchecker.com/gi42wjgz

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.