[the-board] [ui] Add slideIn() and slideOut() methods to ToolBoxGroup
- From: Lucas Almeida Rocha <lucasr src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [the-board] [ui] Add slideIn() and slideOut() methods to ToolBoxGroup
- Date: Sun, 7 Nov 2010 23:20:39 +0000 (UTC)
commit 3e7ffd87369457e08d41ef216647b080aa8ecec8
Author: Lucas Rocha <lucasr gnome org>
Date: Sun Nov 7 19:44:23 2010 +0000
[ui] Add slideIn() and slideOut() methods to ToolBoxGroup
src/js/ui/toolBoxGroup.js | 28 ++++++++++++++++++++++++----
1 files changed, 24 insertions(+), 4 deletions(-)
---
diff --git a/src/js/ui/toolBoxGroup.js b/src/js/ui/toolBoxGroup.js
index 9aefc81..212faef 100644
--- a/src/js/ui/toolBoxGroup.js
+++ b/src/js/ui/toolBoxGroup.js
@@ -81,18 +81,20 @@ ToolBoxGroup.prototype = {
this.emit("active-changed");
},
- _showToolBoxes : function() {
+ _showToolBoxes : function(onComplete) {
Tweener.addTween(this._mainBox,
{ anchorY: 0,
time: _SHOW_TIME,
- transition: _SHOW_TRANSITION });
+ transition: _SHOW_TRANSITION,
+ onComplete: onComplete });
},
- _hideToolBoxes : function() {
+ _hideToolBoxes : function(onComplete) {
Tweener.addTween(this._mainBox,
{ anchorY: _TOOLBOX_ANCHOR_Y,
time: _HIDE_TIME,
- transition: _HIDE_TRANSITION });
+ transition: _HIDE_TRANSITION,
+ onComplete: onComplete });
},
_destroyAllToolBoxes : function() {
@@ -135,6 +137,24 @@ ToolBoxGroup.prototype = {
this._setActiveToolBox(null);
},
+ slideIn : function(onComplete) {
+ if (this._visible) {
+ return;
+ }
+
+ this._visible = true;
+ this._showToolBoxes(onComplete);
+ },
+
+ slideOut : function(onComplete) {
+ if (!this._visible) {
+ return;
+ }
+
+ this._visible = false;
+ this._hideToolBoxes(onComplete);
+ },
+
destroy : function() {
this._destroyAllToolBoxes();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]