OSDN Git Service

getSimpleDurationメソッドの修正
authordhrname <dhrname@users.sourceforge.jp>
Tue, 3 Jan 2012 14:19:16 +0000 (23:19 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Tue, 3 Jan 2012 14:19:16 +0000 (23:19 +0900)
org/w3c/dom/svg.js

index 857c1a0..fab98d9 100644 (file)
@@ -5338,12 +5338,12 @@ SVGAnimationElement.prototype._getOffset = function(/*string*/ t) {
   return (this._currentFrame * 125 * 0.8);
 };
 /*float*/ SVGAnimationElement.prototype.getSimpleDuration = function(){
-  if (!!!this._simpleDuration && !!!this._end && (this._simpleDuration !== 0)) {
+  if (!this._simpleDuration && !this._end && (this._simpleDuration !== 0)) {
     throw new DOMException(DOMException.NOT_SUPPORTED_ERR);
-  } else if (!!this._simpleDuration && !!this._end) {
-    var s = (this._simpleDuration > this._end - this._begin) ? this._end - this._begin : this._simpleDuration;
+  } else if (this._simpleDuration && this._end) {
+    var s = (this._simpleDuration > (this._end - this._begin)) ? this._end - this._begin : this._simpleDuration;
   } else {
-    var s = !!this._end ? this._end - this._begin : this._simpleDuration;
+    var s = this._end ? this._end - this._begin : this._simpleDuration;
   }
  return s;
 };