javascript - Stroked SVG not rendered after scale transformed from 0 to 1 on Chrome -


this fiddle https://jsfiddle.net/qcnn13p5/1/ contains stroked line svg scaled 0.

setting scale 1 js not make render in chrome.

other browsers (tested in edge, firefox, safari, ie11).

any insights, workarounds, known bug confirmations appreciated!

(forcing repaint solutions such how can force webkit redraw/repaint propagate style changes? works not ideal in our scenarios there many many cases)

the stroked line svg in question :

$('#line-container').css('transform', 'scale(1)');  $('#line').css('transform', 'scale(1)');
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>  <div id="line-container" style="transform: scale(0)">    <svg id="line" xmlns="http://www.w3.org/2000/svg" version="1.1" class="staticcontent shapesline fill-transparent border-color8" height="100%" width="100%" preserveaspectratio="none" viewbox="0 0 100 100">    <g xmlns="http://www.w3.org/2000/svg" vector-effect="non-scaling-stroke">       <line x1="0" y1="50" x2="100" y2="50" stroke="currentcolor" stroke-width="3" vector-effect="non-scaling-stroke"/>       <rect x="0" y="30" width="100" height="40" style="fill: none !important; stroke: none !important; pointer-events:all !important" vector-effect="non-scaling-stroke"/>    </g>  </svg>  </div>


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -