Template for issues
by Andrea Bogazzi
HTML
<script src="https://rawgithub.com/kangax/fabric.js/master/dist/fabric.js"></script>
<canvas id="c" width="600" height="600"></canvas>
CSS
canvas {
border: 1px solid #999;
}
JavaScript
/**
* fabric.js template for bug reports
*
* Please update the name of the jsfiddle (see Fiddle Options).
* This templates uses latest dev verison of fabric.js (https://rawgithub.com/kangax/fabric.js/master/dist/fabric.js).
*/
// initialize fabric canvas and assign to global windows object for debug
var canvas = window._canvas = new fabric.Canvas('c');
var svgBad = new String('<svg viewBox="0 0 128 128" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="512px" height="512px"><defs><path id="a" d="M4 4h120v120H4z"/></defs><clipPath id="b"><use xlink:href="#a"/></clipPath><g clip-path="url(#b)" opacity=".45"><path d="M18.04 143.5c-11-1-23-1-32-10-5-5-9-11-11-18-2-8-4-16-3-24 1-7 3-14 6-21 2-4 5-8 8-11 7-6 14-11 22-15 16-8 15-28 3-39-1-1-2-1-3-2-1-2-3-5-2-6 2-10 15-3 23-4 5 0 10 3 14 6 12 9 18 23 18 38-1 7-1 15-4 22l-6 12c-1 2-2 3-4 5-5 4-9 8-14 11-8 4-18 8-20 18-3 13 8 22 14 32v3c-2 2-5 4-9 3z" fill="#83D3F7"/></g><g clip-path="url(#b)" opacity=".45"><path d="M93.04-6.5c10 0 20 2 30 2 27 9 35 41 33 67-1 5-2 10-4 15-1 2-2 5-3 7-10 19-29 28-46 39-16 16-2 39 13 51 1 1 3 4 2 6-11 7-25 1-37 1-3 0-6-2-9-3-8-4-13-10-18-18-4-7-6-14-8-22-2-11-1-21 1-32 2-5 3-9 5-14 3-6 7-11 12-16 9-9 20-14 31-21s13-21 8-32c-2-3-3-6-5-9-5-6-12-9-14-16-1-3 5-5 9-5z" fill="#3BBCF7"/></g><g clip-path="url(#b)"><path d="M13 131v-9.94c0-7.8 5.32-13.94 15.82-18.26C37.87 99.07 50.37 97.02 64 97h.13c25.28 0 50.87 8.26 50.87 24.06V131H13z" fill="#ECEFF1"/><path d="M64.13 98c13.03 0 25.69 2.22 34.75 6.09 6.9 2.94 15.12 8.28 15.12 16.97V130H14v-8.94c0-7.35 5.12-13.18 15.2-17.34 8.93-3.68 21.29-5.71 34.8-5.72h.13m0-2H64c-25.49.03-52 7.28-52 25.06V132h104v-10.94C116 104.3 89.74 96 64.13 96z" fill="#B0BEC5"/></g><g clip-path="url(#b)"><defs><path id="c" d="M12 121.06V132h104v-10.94c0-16.79-26.35-25.09-52-25.06-25.49.03-52 7.28-52 25.06z"/></defs><clipPath id="d"><use xlink:href="#c"/></clipPath><g clip-path="url(#d)"><linearGradient id="e" x1="64.001"...