SVG Icons not available on Firefox

  • I created a custom skin based on the default skin which uses svg buttons.
    On Firefox, these buttons are not available. Neither visible nor clickable. It works on all other brothers (mobile/desktop) though.

  • Hi,

    please post a link to your example.

    Maybe it's the svg image itself...
    The krpano viewer itself basically doesn't care if the image is a png, jpg or svg (or other image format), the url will be only passed to the browser.

    Best regards,
    Klaus

  • Hi,

    please have a look at Link .

    The problem are your SVG images, they don't have width/height defined and Firefox uses 0/0 as default in this case:

    See here:
    https://developer.mozilla.org/en-US/docs/Web…l/SVG_Image_Tag

    Either try using an other SVG editor or other SVG export settings or add the width/height attributes manually in the SVG files.

    Best regards,
    Klaus

  • Hi Klaus,
    thank you for your hint.
    I was able to fix this.
    Example:

    Code
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 33.8 33.32" width="33.8" height="33.8">


    The viewBox attribute was already present. I added the width and height attributes. I needed to use a 1:1 ratio as I use this ratio for the layers (see xml snippet above).

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!