From b6bec797d6a8ef0b377a866c38c67e66a626b45f Mon Sep 17 00:00:00 2001
From: Mike Sherov
Date: Wed, 26 Dec 2012 08:35:42 -0500
Subject: [PATCH] Effects: Rewrite
1. Introduces a set of helper methods to easily create and define new effects.
2. Uses clip animations and placeholders instead of wrappers for clip effects.
3. Ensures all animations are detectable as animated
Fixes #10599
Fixes #9477
Fixes #9257
Fixes #9066
Fixes #8867
Fixes #8671
Fixes #8505
Fixes #7885
Fixes #7041
Closes gh-1017
---
demos/effect/addClass.html | 4 +-
demos/effect/animate.html | 2 +-
demos/effect/default.html | 4 +-
demos/effect/hide.html | 6 +-
demos/effect/show.html | 6 +-
demos/effect/switchClass.html | 4 +-
demos/effect/toggle.html | 6 +-
tests/unit/effects/effects.html | 51 ++-
tests/unit/effects/effects_core.js | 100 +++--
tests/unit/effects/effects_scale.js | 4 +-
tests/visual/effects/all.html | 2 +
tests/visual/effects/clip.html | 3 +-
tests/visual/effects/effects.js | 2 +-
tests/visual/effects/image.png | Bin 0 -> 3894 bytes
tests/visual/index.html | 1 +
ui/effect-blind.js | 82 ++--
ui/effect-bounce.js | 70 ++--
ui/effect-clip.js | 66 ++--
ui/effect-drop.js | 57 ++-
ui/effect-explode.js | 31 +-
ui/effect-fade.js | 25 +-
ui/effect-fold.js | 85 ++---
ui/effect-highlight.js | 31 +-
ui/effect-puff.js | 34 +-
ui/effect-pulsate.js | 51 +--
ui/effect-scale.js | 65 +---
ui/effect-shake.js | 58 +--
ui/effect-size.js | 206 ++++------
ui/effect-slide.js | 73 ++--
ui/effect-transfer.js | 35 +-
ui/effect.js | 563 +++++++++++++++++++++-------
31 files changed, 921 insertions(+), 806 deletions(-)
create mode 100644 tests/visual/effects/image.png
diff --git a/demos/effect/addClass.html b/demos/effect/addClass.html
index f594291fe08..0aab17304e1 100644
--- a/demos/effect/addClass.html
+++ b/demos/effect/addClass.html
@@ -10,8 +10,8 @@
+
@@ -23,7 +24,7 @@
+
@@ -23,7 +24,7 @@
+
@@ -32,7 +33,7 @@
#effect {
position: relative;
width: 240px;
- height: 135px;
+ height: 170px;
padding: 0.4em;
}
#effect h3 {
@@ -52,7 +53,7 @@
var options = {};
// some effects have required parameters
if ( selectedEffect === "scale" ) {
- options = { percent: 0 };
+ options = { percent: 50 };
} else if ( selectedEffect === "size" ) {
options = { to: { width: 200, height: 60 } };
}
@@ -85,6 +86,7 @@
+
diff --git a/tests/unit/effects/effects.html b/tests/unit/effects/effects.html
index d6cfdb7973b..a092ce04bcf 100644
--- a/tests/unit/effects/effects.html
+++ b/tests/unit/effects/effects.html
@@ -88,28 +88,47 @@
width: 100px;
}
+ .relative {
+ position: relative;
+ top: 0px;
+ left: 0px;
+ }
+ .absolute {
+ position: absolute;
+ top: 0px;
+ left: 0px;
+ }
+ .fixed {
+ position: fixed;
+ top: 0px;
+ left: 0px;
+ }
+ .static {
+ position: static;
+ }
+
-
-
-
-
-
Child Element Test
-
-
-
Slide with relative width
-
-
-
-
-
-
+
+
+
+
Child Element Test
+
+
+
Slide with relative width
+
+
+
+
+
+
+