Spaces:
Running on Zero
Running on Zero
Restore pre-Arrow SVG validation
Browse files- validator.py +0 -7
validator.py
CHANGED
|
@@ -47,7 +47,6 @@ ELEMENTS = {
|
|
| 47 |
TIMING = {
|
| 48 |
"attributeName", "values", "from", "to", "by", "dur", "begin",
|
| 49 |
"repeatCount", "fill", "calcMode", "keyTimes", "keySplines",
|
| 50 |
-
"additive", "accumulate", "attributeType",
|
| 51 |
}
|
| 52 |
ANIMATIONS = {
|
| 53 |
"animate": TIMING,
|
|
@@ -119,12 +118,6 @@ def _validate_animation(element: ET.Element, kind: str, parent: str | None) -> N
|
|
| 119 |
raise SVGError("μ λλ©μ΄μ
λ°λ³΅ νμλ₯Ό νμΈν΄ μ£ΌμΈμ.")
|
| 120 |
if element.get("fill", "remove") not in {"freeze", "remove"}:
|
| 121 |
raise SVGError("μ λλ©μ΄μ
μ’
λ£ μνλ₯Ό νμΈν΄ μ£ΌμΈμ.")
|
| 122 |
-
if element.get("additive", "replace") not in {"replace", "sum"}:
|
| 123 |
-
raise SVGError("μ§μνμ§ μλ μ λλ©μ΄μ
ν©μ± λ°©μμ
λλ€.")
|
| 124 |
-
if element.get("accumulate", "none") not in {"none", "sum"}:
|
| 125 |
-
raise SVGError("μ§μνμ§ μλ μ λλ©μ΄μ
λμ λ°©μμ
λλ€.")
|
| 126 |
-
if element.get("attributeType", "auto") not in {"auto", "XML"}:
|
| 127 |
-
raise SVGError("SVG XML μμ±μ μ μ©λλ μ λλ©μ΄μ
μ΄ νμν©λλ€.")
|
| 128 |
value_attrs = {"values", "from", "to", "by"}
|
| 129 |
if kind == "animateMotion":
|
| 130 |
value_attrs.add("path")
|
|
|
|
| 47 |
TIMING = {
|
| 48 |
"attributeName", "values", "from", "to", "by", "dur", "begin",
|
| 49 |
"repeatCount", "fill", "calcMode", "keyTimes", "keySplines",
|
|
|
|
| 50 |
}
|
| 51 |
ANIMATIONS = {
|
| 52 |
"animate": TIMING,
|
|
|
|
| 118 |
raise SVGError("μ λλ©μ΄μ
λ°λ³΅ νμλ₯Ό νμΈν΄ μ£ΌμΈμ.")
|
| 119 |
if element.get("fill", "remove") not in {"freeze", "remove"}:
|
| 120 |
raise SVGError("μ λλ©μ΄μ
μ’
λ£ μνλ₯Ό νμΈν΄ μ£ΌμΈμ.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 121 |
value_attrs = {"values", "from", "to", "by"}
|
| 122 |
if kind == "animateMotion":
|
| 123 |
value_attrs.add("path")
|