Changeset View
Changeset View
Standalone View
Standalone View
effects/fade/package/contents/code/main.js
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Line(s) | 46 | function loadConfig() { | |||
---|---|---|---|---|---|
48 | fadeOutTime = animationTime(effect.readConfig("FadeOutTime", 150)) * 4; | 48 | fadeOutTime = animationTime(effect.readConfig("FadeOutTime", 150)) * 4; | ||
49 | fadeWindows = effect.readConfig("FadeWindows", true); | 49 | fadeWindows = effect.readConfig("FadeWindows", true); | ||
50 | } | 50 | } | ||
51 | loadConfig(); | 51 | loadConfig(); | ||
52 | effect.configChanged.connect(function() { | 52 | effect.configChanged.connect(function() { | ||
53 | loadConfig(); | 53 | loadConfig(); | ||
54 | }); | 54 | }); | ||
55 | function fadeInHandler(w) { | 55 | function fadeInHandler(w) { | ||
56 | if (effects.hasActiveFullScreenEffect) { | ||||
57 | return; | ||||
58 | } | ||||
56 | if (fadeWindows && isFadeWindow(w)) { | 59 | if (fadeWindows && isFadeWindow(w)) { | ||
57 | if (w.fadeOutWindowTypeAnimation !== undefined) { | 60 | if (w.fadeOutWindowTypeAnimation !== undefined) { | ||
58 | cancel(w.fadeOutWindowTypeAnimation); | 61 | cancel(w.fadeOutWindowTypeAnimation); | ||
59 | w.fadeOutWindowTypeAnimation = undefined; | 62 | w.fadeOutWindowTypeAnimation = undefined; | ||
60 | } | 63 | } | ||
61 | w.fadeInWindowTypeAnimation = effect.animate(w, Effect.Opacity, fadeInTime, 1.0, 0.0); | 64 | w.fadeInWindowTypeAnimation = effect.animate(w, Effect.Opacity, fadeInTime, 1.0, 0.0); | ||
62 | } | 65 | } | ||
63 | } | 66 | } | ||
64 | function fadeOutHandler(w) { | 67 | function fadeOutHandler(w) { | ||
68 | if (effects.hasActiveFullScreenEffect) { | ||||
69 | return; | ||||
70 | } | ||||
65 | if (fadeWindows && isFadeWindow(w)) { | 71 | if (fadeWindows && isFadeWindow(w)) { | ||
66 | if (w.fadeOutWindowTypeAnimation !== undefined) { | 72 | if (w.fadeOutWindowTypeAnimation !== undefined) { | ||
67 | // don't animate again as it was already animated through window hidden | 73 | // don't animate again as it was already animated through window hidden | ||
68 | return; | 74 | return; | ||
69 | } | 75 | } | ||
70 | w.fadeOutWindowTypeAnimation = animate({ | 76 | w.fadeOutWindowTypeAnimation = animate({ | ||
71 | window: w, | 77 | window: w, | ||
72 | duration: fadeOutTime, | 78 | duration: fadeOutTime, | ||
Show All 29 Lines |