Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: https://semicomplete.googlecode.com/svn/pimp@208 66067f73-fe4c-0410-82e9-b9c6d0c95a22
- Loading branch information
1 parent
9305e46
commit 4f49c55
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
|
||
|
||
|
||
Effect = { | ||
'Fade': function (obj, time, func) { | ||
if (!obj.style.opacity) | ||
obj.style.opacity = 1; | ||
|
||
var endfunc = function() { | ||
debug("FadeObj: " + obj); | ||
obj.style.display = "none"; | ||
if (func) | ||
func(); | ||
}; | ||
|
||
var a = new Accelimation(obj.style, "opacity", 0, time, 1, ""); | ||
a.onend = endfunc; | ||
a.start(); | ||
}, | ||
|
||
'Appear': function (obj, time, func) { | ||
if (!obj.style.opacity) | ||
obj.style.opacity = 0; | ||
|
||
if (obj.style.display == "none") | ||
obj.style.display = "block"; | ||
|
||
var endfunc = function() { | ||
debug("AppearObj: " + obj); | ||
if (func) | ||
func(); | ||
}; | ||
|
||
var a = new Accelimation(obj.style, "opacity", 1, time, 1, ""); | ||
a.onend = endfunc; | ||
a.start(); | ||
} | ||
} | ||
|