From d0ab36f7db15053c4fdda6d71906fd0dd8fd8be0 Mon Sep 17 00:00:00 2001 From: dotnetCarpenter Date: Thu, 23 Feb 2017 19:38:00 +0100 Subject: remove SVG.TBox --- src/boxes.js | 39 ++++----------------------------------- 1 file changed, 4 insertions(+), 35 deletions(-) (limited to 'src/boxes.js') 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 -- cgit v1.2.3