OSDN Git Service

SVGTextPositioningElementインターフェースにテキスト関連の要素の処理を集めておいた
authordhrname <dhrname@users.sourceforge.jp>
Thu, 22 Dec 2011 14:41:41 +0000 (23:41 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Thu, 22 Dec 2011 14:41:41 +0000 (23:41 +0900)
org/w3c/dom/svg.js

index c1c0abe..141f2a8 100644 (file)
@@ -4083,7 +4083,7 @@ function SVGTextPositioningElement(_doc) {
   /*readonly SVGAnimatedLengthList*/ this.y = new sl();
   /*readonly SVGAnimatedLengthList*/ this.dx = new sl();
   /*readonly SVGAnimatedLengthList*/ this.dy = new sl();
-  _doc = sl = void 0;
+  sl = void 0;
   /*readonly SVGAnimatedNumberList*/ this.rotate = new SVGAnimatedNumberList();
   this.addEventListener("DOMAttrModified", function(evt){
     var tar = evt.target,
@@ -4148,14 +4148,7 @@ function SVGTextPositioningElement(_doc) {
       evt = tar = void 0;
     }
   }, false);
-  return this;
-};
-SVGTextPositioningElement.constructor = SVGTextContentElement;
-SVGTextPositioningElement.prototype = new SVGTextContentElement();
-
-function SVGTextElement(_doc) {
-  SVGTextPositioningElement.apply(this, arguments);
-  this._tar = _doc.createElement("v:group");
+  _doc && (this._tar = _doc.createElement("v:group"));
   this.addEventListener("DOMNodeInserted", function(evt){
     if (evt.eventPhase === /*Event.BUBBLING_PHASE*/ 3) {
       return; //強制終了させる
@@ -4339,6 +4332,14 @@ function SVGTextElement(_doc) {
   },false);
   return this;
 };
+SVGTextPositioningElement.constructor = SVGTextContentElement;
+SVGTextPositioningElement.prototype = new SVGTextContentElement();
+
+function SVGTextElement(_doc) {
+  SVGTextPositioningElement.apply(this, arguments);
+
+  return this;
+};
 SVGTextElement.constructor = SVGTextPositioningElement;
 SVGTextElement.prototype = new SVGTextPositioningElement();