\r
/*setValuesメソッドのオーバライド*/\r
setValues: function() {\r
- if (this.getAttr("keyPoints", null)) {}\r
- return this.$setElement.setValues.apply(this, arguments);\r
- }\r
+ var keyPoints = this.getAttr("keyPoints", null),\r
+ /*$animateElementプロパティは下記のinitメソッドで上書きされているため、\r
+ * $animateElementを別方法で呼び出す必要がある*/\r
+ superSetValues = this.$animateElement.$animateElement.setValues;\r
+ if (keyPoints) {\r
+ return superSetValues.call(this, keyPoints, null, null, null);\r
+ } else {\r
+ return superSetValues.apply(this, arguments);\r
+ }\r
+ },\r
+ \r
+ /*isKeyErrorメソッドのオーバライド\r
+ *keyPoints属性があれば、処理するようにする*/\r
+ isKeyError: function() {\r
+ return !!this.getAttr("keyPoints", false) || this.$animateElement.isKeyError.apply(this, arguments);\r
+ },\r
} )\r
.on("init", function (ele) {\r
if (!ele || !ele.parentNode) {\r
this.isSum = true;\r
this.mode = this.getAttr("mode", "paced");\r
this.rotate = this.getAttr("rotate", "0");\r
+ if (ele.hasAttributeNS(null, "keyPoints") && !ele.hasAttributeNS(null, "path")) {\r
+ /*keyPoints属性がある場合は、path属性に指定がなければ、\r
+ * values属性などの値をpath属性に書いておく*/\r
+ var values = this.getAttr( "values", this.getAttr("from", "")+","+this.getAttr("to", "") );\r
+ ele.setAttributeNS( null, "path", "M " +values.replace(/;/g, " ") );\r
+ }\r
this.path = this.path.cloneNode(true);\r
var mpath = ele.getElementsByTagNameNS(this.path.namespaceURI, "mpath");\r
/*$animateは後で、プロパティを書き換えるために使う。tocallメソッドも参照*/\r