1 pv.SvgScene.bar = function(scenes) { 2 var e = scenes.$g.firstChild; 3 for (var i = 0; i < scenes.length; i++) { 4 var s = scenes[i]; 5 6 /* visible */ 7 if (!s.visible) continue; 8 var fill = s.fillStyle, stroke = s.strokeStyle; 9 if (!fill.opacity && !stroke.opacity) continue; 10 11 e = this.expect(e, "rect", { 12 "shape-rendering": s.antialias ? null : "crispEdges", 13 "pointer-events": s.events, 14 "cursor": s.cursor, 15 "x": s.left, 16 "y": s.top, 17 "width": Math.max(1E-10, s.width), 18 "height": Math.max(1E-10, s.height), 19 "fill": fill.color, 20 "fill-opacity": fill.opacity || null, 21 "stroke": stroke.color, 22 "stroke-opacity": stroke.opacity || null, 23 "stroke-width": stroke.opacity ? s.lineWidth / this.scale : null 24 }); 25 e = this.append(e, scenes, i); 26 } 27 return e; 28 }; 29