From eaaeffb179662d7e0b856b345ac35c329e6f79ff Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ulrich-Matthias=20Sch=C3=A4fer?= Date: Wed, 27 Feb 2019 22:05:11 +0100 Subject: [PATCH] Register classes explicitly instead of relying on `Function.name` because classes could be renamed --- src/animation/Runner.js | 2 +- src/elements/A.js | 2 +- src/elements/Circle.js | 2 +- src/elements/ClipPath.js | 2 +- src/elements/Container.js | 2 +- src/elements/Defs.js | 2 +- src/elements/Dom.js | 2 +- src/elements/Element.js | 2 +- src/elements/Ellipse.js | 2 +- src/elements/ForeignObject.js | 2 +- src/elements/G.js | 2 +- src/elements/Gradient.js | 2 +- src/elements/Image.js | 2 +- src/elements/Line.js | 2 +- src/elements/Marker.js | 2 +- src/elements/Mask.js | 2 +- src/elements/Path.js | 2 +- src/elements/Pattern.js | 2 +- src/elements/Polygon.js | 2 +- src/elements/Polyline.js | 2 +- src/elements/Rect.js | 2 +- src/elements/Shape.js | 2 +- src/elements/Stop.js | 2 +- src/elements/Style.js | 2 +- src/elements/Symbol.js | 2 +- src/elements/Text.js | 2 +- src/elements/TextPath.js | 2 +- src/elements/Tspan.js | 2 +- src/elements/Use.js | 2 +- src/types/Box.js | 2 +- src/types/EventTarget.js | 2 +- src/types/Matrix.js | 2 +- 32 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/animation/Runner.js b/src/animation/Runner.js index eebfb75..fb64005 100644 --- a/src/animation/Runner.js +++ b/src/animation/Runner.js @@ -992,4 +992,4 @@ extend(Runner, { }) extend(Runner, { rx, ry, from, to }) -register(Runner) +register(Runner, 'Runner') diff --git a/src/elements/A.js b/src/elements/A.js index ef047a2..4e7297b 100644 --- a/src/elements/A.js +++ b/src/elements/A.js @@ -42,4 +42,4 @@ registerMethods({ } }) -register(A) +register(A, 'A') diff --git a/src/elements/Circle.js b/src/elements/Circle.js index e3bfacc..29683c9 100644 --- a/src/elements/Circle.js +++ b/src/elements/Circle.js @@ -46,4 +46,4 @@ registerMethods({ } }) -register(Circle) +register(Circle, 'Circle') diff --git a/src/elements/ClipPath.js b/src/elements/ClipPath.js index e545baa..eb21c21 100644 --- a/src/elements/ClipPath.js +++ b/src/elements/ClipPath.js @@ -54,4 +54,4 @@ registerMethods({ } }) -register(ClipPath) +register(ClipPath, 'ClipPath') diff --git a/src/elements/Container.js b/src/elements/Container.js index b47972e..ebaba50 100644 --- a/src/elements/Container.js +++ b/src/elements/Container.js @@ -27,4 +27,4 @@ export default class Container extends Element { } } -register(Container) +register(Container, 'Container') diff --git a/src/elements/Defs.js b/src/elements/Defs.js index 6b486ca..d5e31e7 100644 --- a/src/elements/Defs.js +++ b/src/elements/Defs.js @@ -14,4 +14,4 @@ export default class Defs extends Container { } } -register(Defs) +register(Defs, 'Defs') diff --git a/src/elements/Dom.js b/src/elements/Dom.js index a0afa6d..3acd199 100644 --- a/src/elements/Dom.js +++ b/src/elements/Dom.js @@ -314,4 +314,4 @@ export default class Dom extends EventTarget { } extend(Dom, { attr, find, findOne }) -register(Dom) +register(Dom, 'Dom') diff --git a/src/elements/Element.js b/src/elements/Element.js index cefac49..373ed18 100644 --- a/src/elements/Element.js +++ b/src/elements/Element.js @@ -171,4 +171,4 @@ extend(Element, { bbox, rbox, point, ctm, screenCTM }) -register(Element) +register(Element, 'Element') diff --git a/src/elements/Ellipse.js b/src/elements/Ellipse.js index beba228..60660e7 100644 --- a/src/elements/Ellipse.js +++ b/src/elements/Ellipse.js @@ -33,4 +33,4 @@ registerMethods('Container', { }) }) -register(Ellipse) +register(Ellipse, 'Ellipse') diff --git a/src/elements/ForeignObject.js b/src/elements/ForeignObject.js index e6f9e2b..4e6aae4 100644 --- a/src/elements/ForeignObject.js +++ b/src/elements/ForeignObject.js @@ -16,4 +16,4 @@ registerMethods({ } }) -register(ForeignObject) +register(ForeignObject, 'ForeignObject') diff --git a/src/elements/G.js b/src/elements/G.js index da4af77..d922a41 100644 --- a/src/elements/G.js +++ b/src/elements/G.js @@ -86,4 +86,4 @@ registerMethods({ } }) -register(G) +register(G, 'G') diff --git a/src/elements/Gradient.js b/src/elements/Gradient.js index 23de97d..d5ae8b7 100644 --- a/src/elements/Gradient.js +++ b/src/elements/Gradient.js @@ -79,4 +79,4 @@ registerMethods({ } }) -register(Gradient) +register(Gradient, 'Gradient') diff --git a/src/elements/Image.js b/src/elements/Image.js index 8f27470..fdd3d83 100644 --- a/src/elements/Image.js +++ b/src/elements/Image.js @@ -74,4 +74,4 @@ registerMethods({ } }) -register(Image) +register(Image, 'Image') diff --git a/src/elements/Line.js b/src/elements/Line.js index edf10e7..0b7534b 100644 --- a/src/elements/Line.js +++ b/src/elements/Line.js @@ -65,4 +65,4 @@ registerMethods({ } }) -register(Line) +register(Line, 'Line') diff --git a/src/elements/Marker.js b/src/elements/Marker.js index 238f559..d6a599d 100644 --- a/src/elements/Marker.js +++ b/src/elements/Marker.js @@ -80,4 +80,4 @@ registerMethods({ } }) -register(Marker) +register(Marker, 'Marker') diff --git a/src/elements/Mask.js b/src/elements/Mask.js index 8dfffd6..178dcb5 100644 --- a/src/elements/Mask.js +++ b/src/elements/Mask.js @@ -54,4 +54,4 @@ registerMethods({ } }) -register(Mask) +register(Mask, 'Mask') diff --git a/src/elements/Path.js b/src/elements/Path.js index dc27320..4549506 100644 --- a/src/elements/Path.js +++ b/src/elements/Path.js @@ -78,4 +78,4 @@ registerMethods({ } }) -register(Path) +register(Path, 'Path') diff --git a/src/elements/Pattern.js b/src/elements/Pattern.js index 6dd4e01..99e8ded 100644 --- a/src/elements/Pattern.js +++ b/src/elements/Pattern.js @@ -68,4 +68,4 @@ registerMethods({ } }) -register(Pattern) +register(Pattern, 'Pattern') diff --git a/src/elements/Polygon.js b/src/elements/Polygon.js index afa5f31..5984689 100644 --- a/src/elements/Polygon.js +++ b/src/elements/Polygon.js @@ -29,4 +29,4 @@ registerMethods({ extend(Polygon, pointed) extend(Polygon, poly) -register(Polygon) +register(Polygon, 'Polygon') diff --git a/src/elements/Polyline.js b/src/elements/Polyline.js index 5897295..94a767c 100644 --- a/src/elements/Polyline.js +++ b/src/elements/Polyline.js @@ -29,4 +29,4 @@ registerMethods({ extend(Polyline, pointed) extend(Polyline, poly) -register(Polyline) +register(Polyline, 'Polyline') diff --git a/src/elements/Rect.js b/src/elements/Rect.js index 6e161c9..149ae48 100644 --- a/src/elements/Rect.js +++ b/src/elements/Rect.js @@ -26,4 +26,4 @@ registerMethods({ } }) -register(Rect) +register(Rect, 'Rect') diff --git a/src/elements/Shape.js b/src/elements/Shape.js index cdddc60..25ab6cc 100644 --- a/src/elements/Shape.js +++ b/src/elements/Shape.js @@ -3,4 +3,4 @@ import Element from './Element.js' export default class Shape extends Element {} -register(Shape) +register(Shape, 'Shape') diff --git a/src/elements/Stop.js b/src/elements/Stop.js index 9a5acaa..570dda7 100644 --- a/src/elements/Stop.js +++ b/src/elements/Stop.js @@ -26,4 +26,4 @@ export default class Stop extends Element { } } -register(Stop) +register(Stop, 'Stop') diff --git a/src/elements/Style.js b/src/elements/Style.js index 0b1cdb7..b878189 100644 --- a/src/elements/Style.js +++ b/src/elements/Style.js @@ -50,4 +50,4 @@ registerMethods('Dom', { }) }) -register(Style) +register(Style, 'Style') diff --git a/src/elements/Symbol.js b/src/elements/Symbol.js index f44125c..3dd48d7 100644 --- a/src/elements/Symbol.js +++ b/src/elements/Symbol.js @@ -17,4 +17,4 @@ registerMethods({ } }) -register(Symbol) +register(Symbol, 'Symbol') diff --git a/src/elements/Text.js b/src/elements/Text.js index c12c937..b3fb8e0 100644 --- a/src/elements/Text.js +++ b/src/elements/Text.js @@ -193,4 +193,4 @@ registerMethods({ } }) -register(Text) +register(Text, 'Text') diff --git a/src/elements/TextPath.js b/src/elements/TextPath.js index d8ab125..f26b251 100644 --- a/src/elements/TextPath.js +++ b/src/elements/TextPath.js @@ -98,4 +98,4 @@ registerMethods({ }) TextPath.prototype.MorphArray = PathArray -register(TextPath) +register(TextPath, 'TextPath') diff --git a/src/elements/Tspan.js b/src/elements/Tspan.js index a9c2deb..11f7fc3 100644 --- a/src/elements/Tspan.js +++ b/src/elements/Tspan.js @@ -84,4 +84,4 @@ registerMethods({ } }) -register(Tspan) +register(Tspan, 'Tspan') diff --git a/src/elements/Use.js b/src/elements/Use.js index 7921461..99fb8ec 100644 --- a/src/elements/Use.js +++ b/src/elements/Use.js @@ -24,4 +24,4 @@ registerMethods({ } }) -register(Use) +register(Use, 'Use') diff --git a/src/types/Box.js b/src/types/Box.js index 190d60d..7621029 100644 --- a/src/types/Box.js +++ b/src/types/Box.js @@ -193,4 +193,4 @@ registerMethods({ } }) -register(Box) +register(Box, 'Box') diff --git a/src/types/EventTarget.js b/src/types/EventTarget.js index d414dd8..06fc9a1 100644 --- a/src/types/EventTarget.js +++ b/src/types/EventTarget.js @@ -58,4 +58,4 @@ export default class EventTarget extends Base { removeEventListener () {} } -register(EventTarget) +register(EventTarget, 'EventTarget') diff --git a/src/types/Matrix.js b/src/types/Matrix.js index ef90ca3..c9bf435 100644 --- a/src/types/Matrix.js +++ b/src/types/Matrix.js @@ -500,4 +500,4 @@ export function screenCTM () { return new Matrix(this.node.getScreenCTM()) } -register(Matrix) +register(Matrix, 'Matrix') -- 2.39.5