OSDN Git Service

SVGExceptionCodeのマジックナンバーをコメントに変換
authordhrname <dhrname@users.sourceforge.jp>
Mon, 25 Jun 2012 13:12:40 +0000 (22:12 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Mon, 25 Jun 2012 13:12:40 +0000 (22:12 +0900)
org/w3c/dom/svg.js

index f9d929b..22bbc1f 100644 (file)
@@ -109,20 +109,20 @@ module svg
 */
 function SVGException(code) {
   /*unsigned short*/  this.code = code;
-  if (this.code === SVGException.SVG_WRONG_TYPE_ERR) {
+  if (this.code === /*SVGException.SVG_WRONG_TYPE_ERR*/ 0) {
     this.message = "SVG Wrong Type Error";
-  } else if (this.code === SVGException.SVG_INVALID_VALUE_ERR) {
+  } else if (this.code === /*SVGException.SVG_INVALID_VALUE_ERR*/ 1) {
     this.message = "SVG Invalid Value Error";
-  } else if (this.code === SVGException.SVG_MATRIX_NOT_INVERTABLE) {
+  } else if (this.code === /*SVGException.SVG_MATRIX_NOT_INVERTABLE*/ 2) {
     this.message = "SVG Matrix Not Invertable";
   }
   return this;
 };
 SVGException.prototype = new Error();
 // SVGExceptionCode
-/*const unsigned short*/ SVGException.SVG_WRONG_TYPE_ERR           = 0;
-/*const unsigned short*/ SVGException.SVG_INVALID_VALUE_ERR        = 1;
-/*const unsigned short*/ SVGException.SVG_MATRIX_NOT_INVERTABLE    = 2;
+/*const unsigned short SVGException.SVG_WRONG_TYPE_ERR           = 0;
+/*const unsigned short SVGException.SVG_INVALID_VALUE_ERR        = 1;
+/*const unsigned short SVGException.SVG_MATRIX_NOT_INVERTABLE    = 2;*/
 
 /*SVGElement
  *すべてのSVG関連要素の雛形となるオブジェクト
@@ -705,7 +705,7 @@ SVGColor.prototype = new CSSValue();  //ノードのプロトタイプチェー
   /*readonly SVGICCColor*/    this.iccColor = null;
   this._regD = /\d+/g;
   this._regDP = /[\d.]+%/g;
-  this._exceptionsvg = SVGException.SVG_INVALID_VALUE_ERR;
+  this._exceptionsvg = /*SVGException.SVG_INVALID_VALUE_ERR*/ 1;
   /*void*/ this.setRGBColor = function(/*DOMString*/ rgbColor ){
   var s,
       _parseInt,
@@ -2147,7 +2147,7 @@ SVGMatrix.prototype = {
       s.f = (this.b * this.e - this.a * this.f) / n;
       return s;
     } else {
-      throw (new SVGException(SVGException.SVG_MATRIX_NOT_INVERTABLE));
+      throw (new SVGException(/*SVGException.SVG_MATRIX_NOT_INVERTABLE*/ 2));
     }
   },
   /*SVGMatrix*/ translate : function(/*float*/ x, /*float*/ y ) {
@@ -2187,7 +2187,7 @@ SVGMatrix.prototype = {
   //座標(x, y)と原点の角度の分だけ、回転する
   /*SVGMatrix*/ rotateFromVector : function(/*float*/ x, /*float*/ y ) {
     if ((x === 0) || (y === 0) || !isFinite(x) || !isFinite(y)) {
-      throw (new SVGException(SVGException.SVG_INVALID_VALUE_ERR))
+      throw (new SVGException(/*SVGException.SVG_INVALID_VALUE_ERR*/ 1))
     }
     var m = new SVGMatrix(), rad = Math.atan2(y, x);
     m.a = Math.cos(rad);
@@ -4535,7 +4535,7 @@ t.prototype = new SVGColor();
 };
 /*void*/ t.prototype.setPaint = function(/*unsigned short*/ paintType, /*DOMString*/ uri, /*DOMString*/ rgbColor, /*DOMString*/ iccColor ) {
   if ((paintType < 101 && uri) || (paintType > 102 && !uri)) {
-    throw new SVGException(SVGException.SVG_INVALID_VALUE_ERR);
+    throw new SVGException(/*SVGException.SVG_INVALID_VALUE_ERR*/ 1);
   }
   this.uri = uri;
   this.paintType = paintType;