summaryrefslogtreecommitdiffstats
path: root/src/boxes.js
diff options
context:
space:
mode:
authordotnetCarpenter <jon.ronnenberg@gmail.com>2017-02-24 14:38:01 +0100
committerdotnetCarpenter <jon.ronnenberg@gmail.com>2017-02-24 14:38:01 +0100
commit82da55b56eb2d663db9a5dd6ecfeb79cb7d6f274 (patch)
treef4c621d13447cd467ba532a63456706dd54202f5 /src/boxes.js
parentd0ab36f7db15053c4fdda6d71906fd0dd8fd8be0 (diff)
downloadsvg.js-82da55b56eb2d663db9a5dd6ecfeb79cb7d6f274.tar.gz
svg.js-82da55b56eb2d663db9a5dd6ecfeb79cb7d6f274.zip
deprecate SVG.TBox
Diffstat (limited to 'src/boxes.js')
-rw-r--r--src/boxes.js20
1 files changed, 17 insertions, 3 deletions
diff --git a/src/boxes.js b/src/boxes.js
index 7d5a7b3..7dc9748 100644
--- a/src/boxes.js
+++ b/src/boxes.js
@@ -54,9 +54,23 @@ SVG.BBox = SVG.invent({
})
-SVG.TBox = function() {
- throw 'TBox is removed. Use RBox instead.'
-}
+SVG.TBox = SVG.invent({
+ create: function(element) {
+ console.warn('Use of TBox is deprecated and mapped to RBox. Use .rbox() instead.')
+ // delegate calls to SVG.RBox
+ return SVG.RBox.call(this, element)
+ }
+
+ // define Parent
+, parent: SVG.Element
+
+// Constructor
+, construct: {
+ tbox: function() {
+ return new SVG.TBox(this)
+ }
+ }
+})
SVG.RBox = SVG.invent({
// Initialize