Skip to content

armgit / anime

Public Imported from GitHub
0

JavaScript animation engine

fix wrong animation on Chrome 53

Julian Garnier71ecf7cc0019
diff --git a/anime.js b/anime.js
index ec4426de..6846f8b5 100644
--- a/anime.js
+++ b/anime.js
@@ -1,5 +1,5 @@
/*
- * Anime v1.1.0
+ * Anime v1.1.1
* http://anime-js.com
* JavaScript animation engine
* Copyright (c) 2016 Julian Garnier
@@ -262,8 +262,8 @@
var getAnimationType = function(el, prop) {
if ( is.dom(el) && arrayContains(validTransforms, prop)) return 'transform';
- if ( is.dom(el) && (prop !== 'transform' && getCSSValue(el, prop))) return 'css';
if ( is.dom(el) && (el.getAttribute(prop) || (is.svg(el) && el[prop]))) return 'attribute';
+ if ( is.dom(el) && (prop !== 'transform' && getCSSValue(el, prop))) return 'css';
if (!is.null(el[prop]) && !is.undef(el[prop])) return 'object';
}
diff --git a/examples/svg-path.html b/examples/svg-path.html
new file mode 100644
index 00000000..5ab91bab
--- /dev/null
+++ b/examples/svg-path.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <title>anime.js</title>
+ <meta charset="utf-8">
+ <link rel="icon" type="image/png" href="img/favicon.png" />
+ <link rel="apple-touch-icon" href="img/apple-touch-icon.png" />
+</head>
+<style>
+
+ * {
+ margin: 0;
+ padding: 0;
+ }
+
+ body {
+ background-color: black;
+ }
+
+ section {
+ position: absolute;
+ width: 100%;
+ height: 100%;
+ display: flex;
+ justify-content: center;
+ }
+
+ svg {
+ margin: auto;
+ }
+
+</style>
+</head>
+<body>
+ <section>
+ <svg width="320px" height="320px" viewBox="0 0 320 320">
+ <path fill="#00B5FF" d="M32,160 C32,115 36,104 70,70 C104,36 115,32 160,32 C205,32 216,36 250,70 C284,104 288,115 288,160 C288,205 284,216 250,250 C216,284 205,288 160,288 C115,288 104,284 70,250 C36,216 32,205 32,160 Z"></path>
+ </svg>
+ </section>
+ <script src="../anime.js"></script>
+ <script>
+ anime({
+ targets: 'path',
+ d: 'M72,160 C72,115 16,84 50,50 C84,16 115,72 160,72 C205,72 236,16 270,50 C304,84 248,115 248,160 C248,205 304,236 270,270 C236,304 205,248 160,248 C115,248 84,304 50,270 C16,236 72,205 72,160 Z',
+ duration: 2000,
+ direction: 'normal',
+ easing: 'linear',
+ loop: true
+ });
+ </script>
+</body>
+</html>
diff --git a/package.json b/package.json
index 923d5d45..91847d82 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "animejs",
- "version": "1.1.0",
+ "version": "1.1.1",
"description": "JavaScript animation engine",
"main": "anime.js",
"repository": {