(fill)
| 153 | } |
| 154 | |
| 155 | var createBackground = function(fill) { |
| 156 | svgCanvas.createLayer("background") |
| 157 | cur_shape = svgCanvas.addSvgElementFromJson({ |
| 158 | "element": "rect", |
| 159 | "attr": { |
| 160 | "x": -1, |
| 161 | "y": -1, |
| 162 | "width": res.w+2, |
| 163 | "height": res.h+2, |
| 164 | "stroke": "none", |
| 165 | "id": "canvas_background", |
| 166 | "opacity": 1, |
| 167 | "fill": fill || "#fff", |
| 168 | "style": "pointer-events:none" |
| 169 | } |
| 170 | }); |
| 171 | svgCanvas.setCurrentLayer("Layer 1") |
| 172 | svgCanvas.setCurrentLayerPosition("1") |
| 173 | } |
| 174 | |
| 175 | // create a new layer background if it doesn't exist |
| 176 | if (!document.getElementById('canvas_background')) createBackground(); |
no outgoing calls
no test coverage detected