| 3269 | return this; |
| 3270 | } |
| 3271 | function GgetBBox() { |
| 3272 | if (this.type == "linearGradient") { |
| 3273 | var x1 = $(this.node, "x1") || 0, |
| 3274 | x2 = $(this.node, "x2") || 1, |
| 3275 | y1 = $(this.node, "y1") || 0, |
| 3276 | y2 = $(this.node, "y2") || 0; |
| 3277 | return Snap._.box(x1, y1, math.abs(x2 - x1), math.abs(y2 - y1)); |
| 3278 | } else { |
| 3279 | var cx = this.node.cx || .5, |
| 3280 | cy = this.node.cy || .5, |
| 3281 | r = this.node.r || 0; |
| 3282 | return Snap._.box(cx - r, cy - r, r * 2, r * 2); |
| 3283 | } |
| 3284 | } |
| 3285 | function gradient(defs, str) { |
| 3286 | var grad = arrayFirstValue(eve("snap.util.grad.parse", null, str)), |
| 3287 | el; |