summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2016-08-02 18:44:48 +0200
committerUlrich-Matthias Schäfer <ulima.ums@googlemail.com>2016-08-02 18:44:48 +0200
commit86c99607a393b43aeb50979e97ab69853293847f (patch)
treeea7daa70947062326e8eea3c0c31cc09da4c88bd /src
parent90f8ac60071148d41c209fd0114df1dc1f40e8d8 (diff)
downloadsvg.js-86c99607a393b43aeb50979e97ab69853293847f.tar.gz
svg.js-86c99607a393b43aeb50979e97ab69853293847f.zip
fixed #514 and #5162.3.3
- removed `SVG.Text.clone()` which is inherited by `SVG.Element.clone()` - make element visible when call bbox on a clone
Diffstat (limited to 'src')
-rw-r--r--src/boxes.js2
-rw-r--r--src/text.js11
2 files changed, 2 insertions, 11 deletions
diff --git a/src/boxes.js b/src/boxes.js
index 1e9d0eb..989a69e 100644
--- a/src/boxes.js
+++ b/src/boxes.js
@@ -15,7 +15,7 @@ SVG.BBox = SVG.invent({
box = element.node.getBBox()
} catch(e) {
if(element instanceof SVG.Shape){
- var clone = element.clone(SVG.parser.draw)
+ var clone = element.clone(SVG.parser.draw).show()
box = clone.bbox()
clone.remove()
}else{
diff --git a/src/text.js b/src/text.js
index 6dd4dee..7438cff 100644
--- a/src/text.js
+++ b/src/text.js
@@ -16,17 +16,8 @@ SVG.Text = SVG.invent({
// Add class methods
, extend: {
- clone: function(){
- // clone element and assign new id
- var clone = assignNewId(this.node.cloneNode(true))
-
- // insert the clone after myself
- this.after(clone)
-
- return clone
- }
// Move over x-axis
- , x: function(x) {
+ x: function(x) {
// act as getter
if (x == null)
return this.attr('x')