Code Monkey home page Code Monkey logo

Comments (7)

dnfield avatar dnfield commented on August 15, 2024

That sounds good to me.

I think polygon should be supported tho, that seems like a bug.

from flutter_svg.

SteveAlexander avatar SteveAlexander commented on August 15, 2024

I guess <title> might just be a no-op, like <desc> appears to be?

from flutter_svg.

SteveAlexander avatar SteveAlexander commented on August 15, 2024

I think the polygon issue is when it is in a <defs> section:

    <defs>
        <polygon id="path-1" points="0 14 7.46666667 14 7.46666667 0 0 0"></polygon>
    </defs>

This gets referred to later:

                        <mask id="mask-2" fill="white">
                            <use xlink:href="#path-1"></use>
                        </mask>

from flutter_svg.

dnfield avatar dnfield commented on August 15, 2024

I've had some thoughts o ftrying to use <title> (but desc doesn't seem as useful) for a11y stuff, but nothing too concrete.

There's also been at least some discussion around supporting shapes in <defs>, but nothing concrete there yet either.

I would want to avoid adding too much overhead just to limit verbosity, but if all we're talking about is a simple hashset of elements I think that's probably ok. Of course, it'd be possible to preprocess SVGs to remove these kinds of elements too with XSLT or somesuch, which would add no overhead to the parser for it.

from flutter_svg.

SteveAlexander avatar SteveAlexander commented on August 15, 2024

I guess an "avoid verbose repeated output" switch could be on only in debug mode — a bit like the error reporting in flutter core that abbreviates repeated errors.

from flutter_svg.

dnfield avatar dnfield commented on August 15, 2024

I've checked in a fix for this in 000e17f - wrapped in an assert, so no impact on release code.

It will now track whether it's printed about a particular unhandled element and only print on the first time.

from flutter_svg.

SteveAlexander avatar SteveAlexander commented on August 15, 2024

awesome — I didn't think to use assert in this way. Thanks!

from flutter_svg.

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.