SVG in Firefox available to draw only on small area - firefox

everyone!
Please help me to solve a problem. I have the following svg:
<div style="height: 1257px; width: 728px;">
<svg viewPort="0 0 728 1257" xmlns="http://www.w3.org/2000/svg">
<line stroke="black" stroke-width="2" y2="100" x2="100" y1="100" x1="20"/>
<line stroke="black" stroke-width="2" y2="150" x2="200" y1="154" x1="504"/>
<line y2="353" x2="504" y1="459" x1="388" style="stroke:rgb(255,0,0);stroke-width:2"/>
<line y2="353" x2="504" y1="400" x1="1141" style="stroke:rgb(255,0,0);stroke-width:2"/>
<line y2="197" x2="602" y1="353" x1="504" style="stroke:rgb(255,0,0);stroke-width:2"/>
<line y2="371" x2="957" y1="274" x1="749" style="stroke:rgb(255,0,0);stroke-width:2"/>
<line y2="192" x2="1079" y1="371" x1="957" style="stroke:rgb(255,0,0);stroke-width:2"/>
</svg>
</div>
Please, check it in the FF: http://jsfiddle.net/SgAA5/.
It contains 7 lines inside. I can see it correctly in all browsers except Firefox. Whats wrong with this svg? I trying to draw lines through different ways, but I see only following in the FF:
Just one line, and the part of another one. Looks like only small area available to draw. Any ideas?

Oh, I've found solution on stackoverflow :) Inline SVG with transforms not visible in Firefox, works fine in Chrome
It depends on tag parameters.
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="100%" height="100%">
is right way

Related

SVG turns into black after import

I have the attached SVG that looks fine in my browser, but if I want to import it to figma, it shows only a black box.
It is not a rgba syntax which causes problems. (like in this answer)
But I don't know which elements are also not allowed.
<?xml version="1.0" encoding="UTF-8"?>
<svg class="cracker-loading-logging" width="500px" viewBox="0 0 782 415" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<defs>
<mask id="logo-logging">
<!-- Outline -->
<path d="M204.5,396.510452 C191.445231,396.510452 190.685044,406.440239 178.390463,404.821626 C166.095882,403.203014 167.931614,393.414826 155.321676,390.036003 C142.711738,386.65718 139.407435,396.051866 127.950709,391.306335 C116.493984,386.560804 120.800535,377.581263 109.494774,371.053879 C98.1890124,364.526494 92.5657773,372.745848 82.727664,365.196798 C72.8895508,357.647748 79.3734361,350.088795 70.1423206,340.857679 C60.9112051,331.626564 53.3522519,338.110449 45.8032021,328.272336 C38.2541522,318.434223 46.4735056,312.810988 39.9461212,301.505226 C33.4187369,290.199465 24.4391957,294.506016 19.6936646,283.049291 C14.9481335,271.592565 24.3428195,268.288262 20.9639968,255.678324 C17.585174,243.068386 7.79698582,244.904118 6.17837353,232.609537 C4.55976123,220.314956 14.4895476,219.554769 14.4895476,206.5 C14.4895476,193.445231 4.55976123,192.685044 6.17837353,180.390463 C7.79698582,168.095882 17.585174,169.931614 20.9639968,157.321676 C24.3428195,144.711738 14.9481335,141.407435 19.6936646,129.950709 C24.4391957,118.493984 33.4187369,122.800535 39.9461212,111.494774 C46.4735056,100.189012 38.2541522,94.5657773 45.8032021,84.727664 C53.3522519,74.8895508 60.9112051,81.3734361 70.1423206,72.1423206 C79.3734361,62.9112051 72.8895508,55.3522519 82.727664,47.8032021 C92.5657773,40.2541522 98.1890124,48.4735056 109.494774,41.9461212 C120.800535,35.4187369 116.493984,26.4391957 127.950709,21.6936646 C139.407435,16.9481335 142.711738,26.3428195 155.321676,22.9639968 C167.931614,19.585174 166.095882,9.79698582 178.390463,8.17837353 C190.685044,6.55976123 191.445231,16.4895476 204.5,16.4895476 C217.554769,16.4895476 218.314956,6.55976123 230.609537,8.17837353 C242.904118,9.79698582 241.068386,19.585174 253.678324,22.9639968 C266.288262,26.3428195 269.592565,16.9481335 281.049291,21.6936646 C292.506016,26.4391957 288.199465,35.4187369 299.505226,41.9461212 C310.810988,48.4735056 316.434223,40.2541522 326.272336,47.8032021 C336.110449,55.3522519 329.626564,62.9112051 338.857679,72.1423206 C348.088795,81.3734361 355.647748,74.8895508 363.196798,84.727664 C370.745848,94.5657773 362.526494,100.189012 369.053879,111.494774 C375.581263,122.800535 384.560804,118.493984 389.306335,129.950709 C394.051866,141.407435 384.65718,144.711738 388.036003,157.321676 C391.414826,169.931614 401.203014,168.095882 402.821626,180.390463 C404.440239,192.685044 394.510452,193.445231 394.510452,206.5 C394.510452,219.554769 404.440239,220.314956 402.821626,232.609537 C401.203014,244.904118 391.414826,243.068386 388.036003,255.678324 C384.65718,268.288262 394.051866,271.592565 389.306335,283.049291 C384.560804,294.506016 375.581263,290.199465 369.053879,301.505226 C362.526494,312.810988 370.745848,318.434223 363.196798,328.272336 C355.647748,338.110449 348.088795,331.626564 338.857679,340.857679 C329.626564,350.088795 336.110449,357.647748 326.272336,365.196798 C316.434223,372.745848 310.810988,364.526494 299.505226,371.053879 C288.199465,377.581263 292.506016,386.560804 281.049291,391.306335 C269.592565,396.051866 266.288262,386.65718 253.678324,390.036003 C241.068386,393.414826 242.904118,403.203014 230.609537,404.821626 C218.314956,406.440239 217.554769,396.510452 204.5,396.510452 Z" id="Base" fill="#FFFFFF"
style=".cracker-loading-logging {fill: #FFFFFF;}"></path>
<!-- Mouth cut out -->
<polygon class="cut" fill="#000000" points="204 206.5 411 405 411 8"></polygon>
<!-- Dots in surface -->
<circle fill="#000000" cx="147" cy="107" r="16"></circle>
<circle fill="#000000" cx="261" cy="107" r="16"></circle>
<circle fill="#000000" cx="261" cy="305" r="16"></circle>
<circle fill="#000000" cx="147" cy="305" r="16"></circle>
<circle fill="#000000" cx="80" cy="206" r="16"></circle>
</mask>
</defs>
<rect mask="url(#logo-logging)" width="100%" height="100%"/>
</svg>
The 'styleattribute is definitely wrong. You can't put CSS selectors in astyle` element. You can remove it anyway as it doen't seem to be doing anything useful. Maybe Figma doesn't like it. Removing it could help I suppose.
If it is still showing just a black rectangle, then that would indicate that Figma either doesn't support the mask element, or is having trouble parsing or dereferencing it. Are there other SVGs in your document that could have the same id="logo-logging"? If there are, then this SVG could be using the wrong mask definition.
It doesn't need to be a mask. In fact, it is a little wierd that your icon is a pie shape cut out of a rectangle. If you change it to just being a pie shape, I imagine it will work better in Figma.
Here's a version that doesn't use masks. It should import okay.
<?xml version="1.0" encoding="UTF-8"?>
<svg class="cracker-loading-logging" width="500px" version="1.1" viewBox="0 0 782 415" xmlns="http://www.w3.org/2000/svg"><!-- Outline -->
<path transform="matrix(1.564 0 0 1.564 0 -117)" d="m218.5 122.4c-0.5938-0.4203-1.193-0.8705-1.809-1.486-5.902-5.902-1.757-10.74-8.047-15.56s-9.885 0.4274-17.11-3.746c-7.229-4.174-4.476-9.915-11.8-12.95s-9.437 2.973-17.5 0.8125c-8.063-2.16-6.889-8.418-14.75-9.453-7.861-1.035-8.348 5.314-16.7 5.314s-8.832-6.349-16.69-5.314c-7.861 1.035-6.687 7.293-14.75 9.453-8.063 2.16-10.17-3.847-17.5-0.8125s-4.572 8.776-11.8 12.95c-7.229 4.174-10.82-1.081-17.12 3.746-6.29 4.827-2.145 9.66-8.047 15.56s-10.74 1.757-15.56 8.047c-4.827 6.29 0.4294 9.885-3.744 17.11-4.174 7.229-9.915 4.476-12.95 11.8-3.034 7.325 2.973 9.437 0.8125 17.5-2.16 8.063-8.418 6.889-9.453 14.75-1.035 7.861 5.312 8.348 5.312 16.7s-6.347 8.832-5.312 16.69c1.035 7.861 7.293 6.687 9.453 14.75 2.16 8.063-3.847 10.17-0.8125 17.5 3.034 7.325 8.776 4.572 12.95 11.8 4.174 7.229-1.083 10.82 3.744 17.12 4.827 6.29 9.66 2.145 15.56 8.047s1.757 10.74 8.047 15.56c6.29 4.827 9.886-0.4294 17.12 3.744 7.229 4.174 4.476 9.915 11.8 12.95 7.325 3.034 9.437-2.973 17.5-0.8125 8.063 2.16 6.889 8.418 14.75 9.453 7.861 1.035 8.346-5.312 16.69-5.312s8.834 6.347 16.7 5.312c7.861-1.035 6.687-7.293 14.75-9.453 8.063-2.16 10.17 3.847 17.5 0.8125 7.325-3.034 4.572-8.776 11.8-12.95s10.82 1.083 17.11-3.744 2.145-9.66 8.047-15.56c0.6155-0.6155 1.213-1.068 1.807-1.488l-88.03-84.42 88.03-84.42z" stroke-width=".6394"/>
<g fill="#fff"><!-- Mouth cut out --><!-- Dots in surface -->
<circle cx="147" cy="107" r="16"/>
<circle cx="261" cy="107" r="16"/>
<circle cx="261" cy="305" r="16"/>
<circle cx="147" cy="305" r="16"/>
<circle cx="80" cy="206" r="16"/>
</g>
</svg>

GSAP / TimelineMax SVG Animation of 3D Bar (3 polygons)

I've created a 3D bar in illustrator (see codepen). Now I want to animate it with TweenMax (or TimelineMax) as if it's building up from the bottom to the top.
This is the end result what I need to create:
http://postimg.org/image/pg2drnvch/
I tried a couple of things to make this happen, but without any luck.
Created a clipping-path and then try to change the Y coordinate of the 3 polygons (or wrapped them in a < g >< /g >)
Tried to animate the points of the polygon (http://greensock.com...ing-attrplugin/)
I hope someone can help me with this.
Codepen URL: http://codepen.io/boldcolin/pen/rOPPgP
<?xml version="1.0" encoding="utf-8"?>
<svg version="1.1" id="bar_1_" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px"
width="140.5px" height="366.7px" viewBox="0 0 140.5 366.7" style="enable-background:new 0 0 140.5 366.7;" xml:space="preserve"
>
<style type="text/css">
.st0{clip-path:url(#SVGID_2_);fill:#8BBE3F;}
.st1{clip-path:url(#SVGID_2_);fill:#81A83F;}
.st2{clip-path:url(#SVGID_2_);fill:#A1C63C;}
</style>
<g>
<defs>
<polygon id="SVGID_1_" points="80.3,0 0,40.1 0,336.7 60.2,366.7 140.5,327.1 140.5,30.7 "/>
</defs>
<clipPath id="SVGID_2_">
<use xlink:href="#SVGID_1_" style="overflow:visible;"/>
</clipPath>
<polygon class="st0" points="140.7,169.4 0.2,178.9 0.2,350.2 60.4,380.1 140.7,340.6 "/>
<polyline class="st1" points="60.4,380.1 60.4,205.9 0.2,178.9 0.2,350.2 "/>
<polygon class="st2" points="0.2,178.9 80.5,138.7 140.7,169.4 60.4,209 "/>
</g>
This is an example: http://boldinteractive.nl/raet/bar/
Here I used a white layer on top of the bar which acts like a faux mask. But this is not how I want to make this work..
It's seems impossible to mask a polygon with a polygon and then animate the shape. I'm now using a path (in Illustrator use 'make compound path') and then use this as clipping mask.

Flip all embedded Images in a SVG file

I have an SVG file which contains about 50 embedded images. Now I wish to flip all the images vertically. The only way i found that does this is:
Copy the xlink:href to a browser and download the image
Flip the image in any image editor
Convert the image to a href code
Replace the xlink:href with the one newly generated
I don't want to use any SVG programs please, I hope for a coding help
Example code
<svg contentScriptType="text/ecmascript" zoomAndPan="magnify" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" baseProfile="full"
contentStyleType="text/css" id="svg2" version="1.1" width="460pt" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#" preserveAspectRatio="xMidYMid meet" viewBox="0 0 460 130" height="130pt"
xmlns="http://www.w3.org/2000/svg">
<image x="0" y="0" width="460" xlink:href= "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMQAAADTCAYAAADedbxIAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAOwwAADsMBx2+oZAAAEbtJREFUeJztnVuW6ygMRfFaGUYPuefXw3F/xOUYJEDiKfDRx70pG+lQCtuA4nKO//7953TOOff9V2clPpef2lXtcET9sqEqfi91ky5aR2FQ2OdOXSaHJ/eDJu/PAIfC9Q8etdZ5a4VGDwXwPBqo4BH08W4iyGESnqTWmfwx0avX28cduWwdv3+FIFTDE/h1hcc5504NPNfREniejczAEzR+OTyfI76yuE48zmRzoYfH01ZebUkAJTz3fyWzTwk8QSPx7NMYHlZbrLU3PJ+/PpOuJxIUz8OpSOyvwVECz/OHQnjErh3g4UONgeduJrwAvQmeD+mH4JeNwsOc7AaPwG8KPJffEHhuP9cfHqHfGHhEAYvsXjLdV8GKAcPZ6+C5/FA0yPuUwxN4N5x9PqGPagnRG56EXxt4fo1QNAiOrgKPSEsOT6LKlBiBBfCEy2ORT0JEA08Y0j+BogH1KywaiC9aQQNDRYPfkokJ+ZyZ04ESI/BItor6iOGJaIW2XNGgATxiVxQNbqOb6kerQ9yB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NaE7m7iGwnqVmdKBMtYE5WWtTjcHiGy4o1CpzshYQGgM81JATakFO0lWmlyYlacgJtY1ykp4hMCVTe+lASdpGOWm7ZNooMU0MFxRqxsfIvD2E8cRMMeTEtwkXlDU21Rgo1JATag1ysgYQGsNAoYacUIvk5H/ILi7q3fYfVAAAAABJRU5ErkJggg=="
id="image6418" height="130"/>
Add transform="scale(1, -1)" to the images. You may need to translate them back if they aren't centred round the origin. So in the case above you want to add this to the image element:
transform="translate(0, 130) scale(1, -1)"

SVG pattern contains whitespace between repetitions in Firefox

I'm using an inline svg that fills an area with a lined pattern. The svg displays correctly Chrome and Safari but on Firefox there are gaps in between the vertical repetitions of the pattern as shown below:
<svg version="1.1" id="clouds" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 744.9 203" preserveAspectRatio="xMinYMin meet ">
<pattern x="66.95" y="122" width="24" height="24" patternUnits="userSpaceOnUse" id="line-fill" viewBox="0 -24 24 24" overflow="visible">
<polygon fill="none" points="0,0 24,0 24,-24 0,-24"/>
<g>
<polygon fill="#D83D96" points="4.4,-9.5 0,-5.1 0,-6.9 9.5,-16.4 9.5,-16.4 17.1,-24 18.9,-24 16.7,-21.5 16.7,-21.5"/>
<polygon fill="#D83D96" points="4.4,-21.5 0,-17.1 0,-18.9 5.1,-24 6.9,-24"/>
<polygon fill="#D83D96" points="24,-6.9 24,-5.1 18.9,0 17.1,0 21.8,-4.4"/>
<polygon fill="#D83D96" points="24,-18.9 24,-17.1 16.7,-9.5 16.7,-9.5 6.9,0 5.1,0 9.5,-4.4 9.5,-4.4 21.8,-16.4"/>
</g>
</pattern>
<g fill="url(#line-fill)">
<circle cx="12.5" cy="22.5" r="12.5"/>
<path d="M180.5,54.5c-10.1,0-19.6,2.3-28.1,6.5c6.3-6.5,10.1-15.3,10.1-25c0-19.9-16.1-36-36-36
c-18.9,0-34.4,14.6-35.9,33.1c-4.2-4.1-9.9-6.6-16.2-6.6C61.5,26.5,51,37,51,49.9c0,12.7,10.1,23,22.6,23.4
C64.7,79.9,59,90.5,59,102.5c0,20.2,16.3,36.5,36.5,36.5c8.4,0,16.1-2.8,22.3-7.6c6,29.2,31.8,51.1,62.7,51.1c35.3,0,64-28.7,64-64
C244.5,83.2,215.8,54.5,180.5,54.5z M126.8,83.7c-6.4-10.6-18-17.7-31.3-17.7c-1.5,0-2.9,0.1-4.4,0.3c2.7-2.7,4.7-6.1,5.8-9.8
c6.5,9.4,17.3,15.6,29.6,15.6c4.4,0,8.7-0.8,12.6-2.3C134.3,73.8,130.2,78.5,126.8,83.7z"/>
<path d="M702.8,87.9v-0.3h0c-0.2-18.3-15-33.1-33.4-33.1S636.2,69.3,636,87.6h-2.2
c1.4-3.9,2.1-8.2,2.1-12.6c0-21-17-38-38-38c-16.7,0-30.8,10.7-35.9,25.7c-4.2-17.5-20.4-30.6-39.8-30.6c-18.4,0-33.9,11.7-39,27.8
V41h0c0-0.3,0-0.7,0-1c0-15.1-12.3-27.4-27.4-27.4c-15.1,0-27.4,12.3-27.4,27.4c0,0.3,0,0.7,0,1h-3.9
c-1.4-12.1-11.7-21.5-24.2-21.5c-12.5,0-22.8,9.4-24.2,21.5H376v81.3h107.3v-0.1h219.5V87.9C702.8,87.9,702.8,87.9,702.8,87.9
C702.8,87.9,702.8,87.9,702.8,87.9z M562.1,87.6h-2.6c0.6-1.2,1.1-2.5,1.5-3.8C561.4,85.1,561.7,86.4,562.1,87.6z M483.3,83.1
c0.5,1.5,1.1,3,1.8,4.5h-1.8V83.1z"/>
<circle cx="642" cy="172.6" r="30.4"/>
<circle cx="732.6" cy="173.6" r="12.2"/>
</g>
</svg>
Here is a fiddle to fiddle with: http://jsfiddle.net/Qs3Y9/
It seems to possibly be a rounding issue since the gaps disappear and reappear as the bounding box is resized but I am fairly new to svg patterns so I'm at a loss as to where to even start looking for the solution.
It happens on Webkit and other browsers also. It is just not as obvious. It is just to do with antialiasing where the pattern squares touch. You can mitigate it by not having your hatch lines terminate exactly at the pattern boundary. Have them extend past it a bit. The extensions won't be drawn but it will mean the that antialiasing will be invisible (or almost invisible).
<pattern x="0" y="0" width="24" height="24" patternUnits="userSpaceOnUse" id="line-fill" viewBox="0 0 24 24" overflow="visible" stroke="#D83D96" stroke-width="1.5">
<line x1="-2" y1="8" x2="8" y2="-2"/>
<line x1="-2" y1="20" x2="20" y2="-2"/>
<line x1="4" y1="26" x2="26" y2="4"/>
<line x1="16" y1="26" x2="26" y2="16"/>
</pattern>
Demo here: http://jsfiddle.net/Qs3Y9/2/

How can I make text orbit along a circular path using HTML5 Canvas?

There are a number of JavaScript snippets that will make text or graphics travel along a circular path with the letters or words always upright.
Example: http://www.dseffects.com/f_scripts.html
I want to have text (or graphics) orbit a point the way the moon orbits the Earth, with one face always toward the center. The following example shows this, but very crudely and not using web fonts.
Example: http://javaboutique.internet.com/text/Manipulation/TextRotor/
I am sure there is a way to modify orbiting code like the first example (only not around the cursor) so that each letter/image keeps one side toward the center (axis).
SVG really is the way to go for this kind of thing. I just whipped this up really quick but at least it works as an example. The HTML part can vary a lot but this is one way.
Put this into an html page:
<iframe src="orbitingText.svg" width="100%" height="100%"></iframe>
Then, create the orbitingText.svg file (it's just a text file with a .svg extension):
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="100%" height="100%" viewBox="0 0 300 300">
<defs>
<path id="textPath" d="M 150 75 a 75 75 0 1 0 0.00001 0"/>
</defs>
<circle cx="150" cy="150" r="40" stroke="blue" stroke-width="1"></circle>
<text fill="red">
<textPath xlink:href="#textPath" startOffset="0">
<animate attributeName="startOffset" dur="7s" from="0" to="500" repeatCount="indefinite" />
Orbiting Text
</textPath>
</text>
Oh, and if you are worried about cross-browser compatibility, check out this site:
http://code.google.com/p/svgweb/

Resources