return this;
}
/*begin属性とend属性を処理する*/
- var _begin = tar._begin ? tar._getOffset(tar._begin) : 0,
- that = tar,
+ var that = tar,
timing = function(val, name, offset) {
/*timing関数は時間のタイミングをidとeventと、clock-value(offset)に分割して処理していく
*まず、idを検出するためのsearcIdローカル関数を作る
}
val = searchId = id = void 0;
};
- timing((tar._begin || "0ms"), "beginElementAt", _begin);
- if (tar._end) {
- timing(tar._end, "endElementAt", tar._getOffset(tar._end));
+ if (tar._begin) {
+ timing(tar._begin, "beginElementAt", tar._getOffset(tar._begin));
+ } else {
+ tar.beginElement();
}
+ tar._end && timing(tar._end, "endElementAt", tar._getOffset(tar._end));
that = void 0;
if (tar.hasAttributeNS("http://www.w3.org/1999/xlink", "xlink:href")) {
tar.targetElement = tar.ownerDocument.getElementById(tar.getAttributeNS("http://www.w3.org/1999/xlink", "xlink:href").substring(1))
** Note that when the simple duration is "indefinite", some simple use cases can yield surprising results. See the related example #4 in Appendix B.
*/
SVGAnimationElement.prototype._getOffset = function(/*string*/ t) {
- var n = parseFloat(t.match(this._timeRegExp)),
+ var n = parseFloat((t.match(this._timeRegExp) || "0")),
offset = 0;
if (isFinite(n) && RegExp.$1) {
var offset = n * this._unit[RegExp.$1]