OSDN Git Service

g要素とuse要素のインターフェースをbase関数で表現
authordhrname <sie-developers@lists.sourceforge.jp>
Sat, 25 Oct 2014 14:17:09 +0000 (23:17 +0900)
committerdhrname <sie-developers@lists.sourceforge.jp>
Sat, 25 Oct 2014 14:17:09 +0000 (23:17 +0900)
org/w3c/dom/svg.js

index 519d963..2037d7a 100644 (file)
@@ -132,7 +132,7 @@ NAIBU.eval = function(code) {
 /*$svgelement\r
  *すべてのSVG関連要素の雛形となるオブジェクト\r
  */\r
-base("$document").$element.up("$svgelement").mix( {\r
+base.$1 = base("$document").$element.up("$svgelement").mix( {\r
   initialize: function () {\r
     SVGStylable.call(this);             //ElementCSSInlineStyleのインタフェースを継承\r
     /*interface SVGTransformable : SVGLocatable\r
@@ -1527,7 +1527,8 @@ function SVGViewSpec(ele) {
   /*readonly DOMString*/        this.viewBoxString = this.preserveAspectRatioString = this.transformString = this.viewTargetString = "";\r
 };\r
 \r
-function SVGGElement(_doc) {\r
+base.$1.up("http://www.w3.org/2000/svgg")\r
+ .on("initialize",  function (_doc) {\r
   this._tar = _doc.createElement("v:group");\r
   _doc = void 0;\r
   /*以下の処理は、この子要素ノードがDOMツリーに追加されて初めて、\r
@@ -1560,7 +1561,7 @@ function SVGGElement(_doc) {
     }\r
     tnext = sar = spar = snext = void 0;\r
   }, false);\r
-};\r
+} );\r
 \r
 function SVGDefsElement() {\r
   this.style.setProperty("display", "none");\r
@@ -1578,8 +1579,8 @@ function SVGTitleElement() {
 function SVGSymbolElement(_doc) {\r
 };\r
 \r
-function SVGUseElement() {\r
-  SVGGElement.apply(this, arguments);\r
+base.$1.up("http://www.w3.org/2000/svguse").initialize = function () {\r
+  this["http://www.w3.org/2000/svgg"].initialize.apply(this, arguments);\r
   var slen = SVGAnimatedLength;\r
   /*readonly SVGAnimatedLength*/   this.x = new slen();           //use要素のx属性に対応(以下、同様)\r
   /*readonly SVGAnimatedLength*/   this.y = new slen();\r
@@ -6387,7 +6388,6 @@ function SVGForeignObjectElement(_doc) /*:
 \r
 //#endif  _SVG_IDL_\r
 base("DOMImplementation")["http://www.w3.org/2000/svg"] = {\r
-  g:               SVGGElement,\r
   path:            NAIBU.SVGPathElement,\r
   title:           SVGTitleElement,\r
   desc:            SVGDescElement,\r
@@ -6436,7 +6436,6 @@ base("DOMImplementation")["http://www.w3.org/2000/svg"] = {
   "symbol":        SVGSymbolElement,\r
   textPath:        SVGTextPathElement,\r
   tref:            SVGTRefElement,\r
-  use:             SVGUseElement,\r
   view:            SVGViewElement,\r
   vkern:           SVGVKernElement,\r
   pattern:         SVGPatternElement\r