OSDN Git Service

Modify the init method of the
authordhrname <dhrname@users.sourceforge.jp>
Wed, 18 May 2016 14:08:39 +0000 (23:08 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Wed, 18 May 2016 14:08:39 +0000 (23:08 +0900)
org/w3c/dom/smil.js
tool/Spec/spec/SvgDomSpec.js

index 98c4970..4792923 100644 (file)
@@ -1646,6 +1646,7 @@ base("$calcMode").up("$attribute").mix( {
    }\r
    this.getAttr = this.$attribute.getAttr;\r
    this.type = this.getAttr("type", "translate");\r
+   this.attrName = "transform";\r
    var parent = this.element;\r
    this.isDefault = parent.hasAttributeNS(null, "transform");\r
    this.defaultValue = parent.getAttributeNS(null, "transform") || "";\r
index 0a4a82b..c6f1d8a 100644 (file)
@@ -2824,19 +2824,25 @@ describe("SMIL Animation Spec", function() {
           expect($animate.numberOfList).toBe(-1);\r
           expect(p.__transformList).toBeUndefined();\r
           expect($animate.type).toBe("translate");\r
+          expect($animate.attrName).toBe("transform");\r
           \r
           $animate.init(p);\r
           expect($animate.numberOfList).toBe(-1);\r
           expect(p.__transformList).toBeUndefined();\r
           expect($animate.type).toBe("translate");\r
+          expect($animate.attrName).toBe("transform");\r
           \r
           $animate.init(ele);\r
           expect($animate.numberOfList).toBe(-1);\r
           expect(p.__transformList).toEqual([]);\r
+          expect($animate.type).toBe("translate");\r
+          expect($animate.attrName).toBe("transform");\r
           \r
           ele.setAttributeNS(null, "values", "0;1");\r
+          ele.setAttributeNS(null, "attributeName", "");\r
           $animate.init(ele);\r
           expect($animate.type).toBe("translate");\r
+          expect($animate.attrName).toBe("transform");\r
           expect($animate.numberOfList).toBe(0);\r
           expect(p.__transformList).toEqual([ {isPlaying: false,\r
                                                value: "translate(0)",\r