diff options
author | dotnetCarpenter <jon.ronnenberg@gmail.com> | 2017-02-23 19:38:00 +0100 |
---|---|---|
committer | dotnetCarpenter <jon.ronnenberg@gmail.com> | 2017-02-23 21:15:52 +0100 |
commit | d0ab36f7db15053c4fdda6d71906fd0dd8fd8be0 (patch) | |
tree | 9d93479bd76c1ea3638f495b9bd95ec4a89090ed /src | |
parent | ceaf24d5a25bc815148d10eaea3112eb6ecf8488 (diff) | |
download | svg.js-d0ab36f7db15053c4fdda6d71906fd0dd8fd8be0.tar.gz svg.js-d0ab36f7db15053c4fdda6d71906fd0dd8fd8be0.zip |
remove SVG.TBox
Diffstat (limited to 'src')
-rw-r--r-- | src/boxes.js | 39 |
1 files changed, 4 insertions, 35 deletions
diff --git a/src/boxes.js b/src/boxes.js index 989a69e..7d5a7b3 100644 --- a/src/boxes.js +++ b/src/boxes.js @@ -54,40 +54,9 @@ SVG.BBox = SVG.invent({ }) -SVG.TBox = SVG.invent({ - // Initialize - create: function(element) { - // get values if element is given - if (element) { - var t = element.ctm().extract() - , box = element.bbox() - - // width and height including transformations - this.width = box.width * t.scaleX - this.height = box.height * t.scaleY - - // x and y including transformations - this.x = box.x + t.x - this.y = box.y + t.y - } - - // add center, right and bottom - fullBox(this) - } - - // Define Parent -, parent: SVG.Element - - // Constructor -, construct: { - // Get transformed bounding box - tbox: function() { - return new SVG.TBox(this) - } - } - -}) - +SVG.TBox = function() { + throw 'TBox is removed. Use RBox instead.' +} SVG.RBox = SVG.invent({ // Initialize @@ -147,7 +116,7 @@ SVG.RBox = SVG.invent({ }) // Add universal merge method -;[SVG.BBox, SVG.TBox, SVG.RBox].forEach(function(c) { +;[SVG.BBox, SVG.RBox].forEach(function(c) { SVG.extend(c, { // Merge rect box with another, return a new instance |