social_cheesecake 0.0.4 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. data/.gitignore +2 -0
  2. data/Rakefile +111 -0
  3. data/app/assets/javascripts/kinetic.js +448 -407
  4. data/app/assets/javascripts/social_cheesecake.js +1 -2
  5. data/app/assets/javascripts/socialcheesecake/_header.js +28 -0
  6. data/app/assets/javascripts/socialcheesecake/actor.js +104 -41
  7. data/app/assets/javascripts/socialcheesecake/cheesecake.js +26 -31
  8. data/app/assets/javascripts/socialcheesecake/grid.js +53 -12
  9. data/app/assets/javascripts/socialcheesecake/sector.js +108 -93
  10. data/app/assets/javascripts/socialcheesecake/text.js +39 -36
  11. data/lib/generators/social_cheesecake/install_generator.rb +10 -0
  12. data/lib/social_cheesecake/version.rb +1 -1
  13. data/social_cheesecake.gemspec +1 -0
  14. data/test/dummy/.gitignore +15 -0
  15. data/test/dummy/Gemfile +34 -0
  16. data/test/dummy/README +261 -0
  17. data/test/dummy/Rakefile +7 -0
  18. data/test/dummy/app/assets/images/beatriz.png +0 -0
  19. data/test/dummy/app/assets/images/rails.png +0 -0
  20. data/test/dummy/app/assets/images/youngAlberto.png +0 -0
  21. data/test/dummy/app/assets/javascripts/application.js +10 -0
  22. data/test/dummy/app/assets/stylesheets/application.css +7 -0
  23. data/test/dummy/app/controllers/application_controller.rb +3 -0
  24. data/test/dummy/app/helpers/application_helper.rb +2 -0
  25. data/test/dummy/app/mailers/.gitkeep +0 -0
  26. data/test/dummy/app/models/.gitkeep +0 -0
  27. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  28. data/test/dummy/config/application.rb +48 -0
  29. data/test/dummy/config/boot.rb +6 -0
  30. data/test/dummy/config/database.yml +25 -0
  31. data/test/dummy/config/environment.rb +5 -0
  32. data/test/dummy/config/environments/development.rb +30 -0
  33. data/test/dummy/config/environments/production.rb +60 -0
  34. data/test/dummy/config/environments/test.rb +39 -0
  35. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  36. data/test/dummy/config/initializers/inflections.rb +10 -0
  37. data/test/dummy/config/initializers/mime_types.rb +5 -0
  38. data/test/dummy/config/initializers/secret_token.rb +7 -0
  39. data/test/dummy/config/initializers/session_store.rb +8 -0
  40. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  41. data/test/dummy/config/locales/en.yml +5 -0
  42. data/test/dummy/config/routes.rb +58 -0
  43. data/test/dummy/config.ru +4 -0
  44. data/test/dummy/db/seeds.rb +7 -0
  45. data/test/dummy/doc/README_FOR_APP +2 -0
  46. data/test/dummy/lib/assets/.gitkeep +0 -0
  47. data/test/dummy/lib/tasks/.gitkeep +0 -0
  48. data/test/dummy/log/.gitkeep +0 -0
  49. data/test/dummy/public/404.html +26 -0
  50. data/test/dummy/public/422.html +26 -0
  51. data/test/dummy/public/500.html +26 -0
  52. data/test/dummy/public/favicon.ico +0 -0
  53. data/test/dummy/public/index.html +133 -0
  54. data/test/dummy/public/robots.txt +5 -0
  55. data/test/dummy/script/rails +6 -0
  56. data/test/dummy/test/fixtures/.gitkeep +0 -0
  57. data/test/dummy/test/functional/.gitkeep +0 -0
  58. data/test/dummy/test/integration/.gitkeep +0 -0
  59. data/test/dummy/test/performance/browsing_test.rb +12 -0
  60. data/test/dummy/test/test_helper.rb +13 -0
  61. data/test/dummy/test/unit/.gitkeep +0 -0
  62. data/test/dummy/vendor/assets/stylesheets/.gitkeep +0 -0
  63. data/test/dummy/vendor/plugins/.gitkeep +0 -0
  64. metadata +114 -29
  65. data/app/assets/javascripts/socialCheesecake.js +0 -161
@@ -1,3 +1,2 @@
1
1
  //= require kinetic
2
- //= require socialCheesecake
3
-
2
+ //= require_directory ./socialcheesecake
@@ -0,0 +1,28 @@
1
+ /**
2
+ * @license SocialCheesecake JavaScript Library v0.1.0
3
+ * https://github.com/adiezbal/SocialCheesecake
4
+ * Developed by Alicia Díez (https://github.com/adiezbal)
5
+ * Copyright 2011, Technical University of Madrid (Universidad Politécnica de Madrid)
6
+ * Licensed under the MIT or GPL Version 2 licenses.
7
+ * Date: Dec 22 2011
8
+ *
9
+ * Copyright (C) 2011 by Technical University of Madrid (Universidad Politécnica de Madrid)
10
+ *
11
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
12
+ * of this software and associated documentation files (the "Software"), to deal
13
+ * in the Software without restriction, including without limitation the rights
14
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
15
+ * copies of the Software, and to permit persons to whom the Software is
16
+ * furnished to do so, subject to the following conditions:
17
+ *
18
+ * The above copyright notice and this permission notice shall be included in
19
+ * all copies or substantial portions of the Software.
20
+ *
21
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
22
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
23
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
24
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
25
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
26
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
27
+ * THE SOFTWARE.
28
+ */
@@ -1,10 +1,5 @@
1
- socialCheesecake.defineModule(
2
- 'SocialCheesecake#Actor'
3
- )
4
- .dependsOn(
5
- 'SocialCheesecake#Text'
6
- )
7
- .withCode(function() {
1
+ var socialCheesecake = socialCheesecake || {};
2
+ (function() {
8
3
  socialCheesecake.Actor = function(settings) {
9
4
  if(!settings) throw "No arguments passed to the function"
10
5
  if(!settings.parent) throw "Actor must be associated to at least a subsector"
@@ -16,12 +11,16 @@ socialCheesecake.defineModule(
16
11
  }
17
12
  }
18
13
  this.id = settings.id;
14
+ this.opacity = 1;
15
+ this._focused = false;
16
+ this._selected = false;
17
+ this._hidden = false;
18
+ this.fading = "none";
19
19
  this.parents = [];
20
20
  if(settings.parent) this.parents.push(settings.parent);
21
21
 
22
22
  var actor = this;
23
- var gridIdPrefix = this.parents[0].parent.parent.grid.divIdPrefix;
24
- var actor_div = document.getElementById(gridIdPrefix+this.id);
23
+ var actor_div = actor.getDiv();
25
24
  var mouseoverCallback = function(){
26
25
  var sector;
27
26
  actor.focus();
@@ -39,32 +38,33 @@ socialCheesecake.defineModule(
39
38
  sector.eventHandler("mouseout");
40
39
  actor.parents[subsector].eventHandler("mouseout");
41
40
  }
42
- console.log("mouseout");
43
41
  }
44
42
  actor_div.addEventListener("mouseover", mouseoverCallback, false);
45
43
  actor_div.addEventListener("mouseout", mouseoutCallback, false);
46
44
  actor_div.addEventListener("mousedown", function(){
47
45
  var sector;
48
- if( arguments.callee.activeActor){
46
+ if( actor.isSelected()){
49
47
  // Deactivate actor
50
- arguments.callee.activeActor = false;
48
+ actor._selected = false;
51
49
  actor_div.addEventListener("mouseover", mouseoverCallback, false);
52
50
  actor_div.addEventListener("mouseout", mouseoutCallback, false);
53
51
  }else{
54
52
  //Activate actor
55
- arguments.callee.activeActor = true;
53
+ actor._selected = true;
56
54
  actor_div.removeEventListener("mouseover", mouseoverCallback, false);
57
55
  actor_div.removeEventListener("mouseout", mouseoutCallback, false);
58
56
  }
59
57
  });
60
58
  }
61
59
 
60
+ socialCheesecake.Actor.prototype.isSelected = function() {
61
+ return this._selected;
62
+ }
63
+
62
64
  socialCheesecake.Actor.prototype.focus = function() {
63
- var cheesecake = this.parents[0].parent.parent;
64
- var gridIdPrefix = cheesecake.grid.divIdPrefix;
65
- var actor_id = this.id;
66
- var actor_div = document.getElementById(gridIdPrefix+actor_id);
65
+ var actor_div = this.getDiv();
67
66
  var newClass="";
67
+ this._focused = true;
68
68
  if (actor_div.getAttribute("class")){
69
69
  if (!(actor_div.getAttribute("class").match(/\sfocused/) )){
70
70
  newClass = actor_div.getAttribute("class").concat(" focused");
@@ -77,36 +77,24 @@ socialCheesecake.defineModule(
77
77
  }
78
78
 
79
79
  socialCheesecake.Actor.prototype.unfocus = function() {
80
- var cheesecake = this.parents[0].parent.parent;
81
- var gridIdPrefix = cheesecake.grid.divIdPrefix;
82
- var actor_id = this.id;
83
- var actor_div = document.getElementById(gridIdPrefix+actor_id);
80
+ var actor_div = this.getDiv();
84
81
  var newClass="";
82
+ this._focused = false;
85
83
  if (actor_div.getAttribute("class")){
86
84
  newClass = actor_div.getAttribute("class").replace(/(^|\s)focused($|\s)/, "");
87
85
  actor_div.setAttribute("class", newClass);
88
86
  }
89
87
  }
90
88
 
91
- socialCheesecake.Actor.prototype.isFocused = function() {
92
- var cheesecake = this.parents[0].parent.parent;
93
- var gridIdPrefix = cheesecake.grid.divIdPrefix;
94
- var actor_id = this.id;
95
- var actor_div = document.getElementById(gridIdPrefix+actor_id);
96
- var focused = false;
97
- if ((actor_div.getAttribute("class")) &&
98
- (actor_div.getAttribute("class").match(/(^|\s)focused($|\s)/))){
99
- focused = true;
100
- }
101
- return focused;
89
+ socialCheesecake.Actor.prototype.isFocused = function() { var actor = this;
90
+ var gridIdPrefix = this.getCheesecake().grid.divIdPrefix;
91
+ return this._focused;
102
92
  }
103
93
 
104
94
  socialCheesecake.Actor.prototype.hide = function() {
105
- var cheesecake = this.parents[0].parent.parent;
106
- var gridIdPrefix = cheesecake.grid.divIdPrefix;
107
- var actor_id = this.id;
108
- var actor_div = document.getElementById(gridIdPrefix+actor_id);
95
+ var actor_div = this.getDiv();
109
96
  var newStyle=" display: none;";
97
+ this._hidden = true;
110
98
  if (actor_div.getAttribute("style")){
111
99
  if (actor_div.getAttribute("style").match(/display\s*:\s*[a-z]*;/)){
112
100
  newStyle = actor_div.getAttribute("style").replace(/display\s*:\s*[a-z]*;/, "display: none;");
@@ -115,17 +103,92 @@ socialCheesecake.defineModule(
115
103
  }
116
104
  }
117
105
  actor_div.setAttribute("style", newStyle);
106
+ this.setDivOpacity(0);
107
+ this.fading= "none";
118
108
  }
119
109
 
120
110
  socialCheesecake.Actor.prototype.show = function() {
121
- var cheesecake = this.parents[0].parent.parent;
122
- var gridIdPrefix = cheesecake.grid.divIdPrefix;
123
- var actor_id = this.id;
124
- var actor_div = document.getElementById(gridIdPrefix+actor_id);
111
+ var actor_div = this.getDiv();
112
+ this._hidden = false;
125
113
  if (actor_div.getAttribute("style")){
126
114
  var newStyle = actor_div.getAttribute("style").replace(/display\s*:\s*none;/, "");
127
115
  actor_div.setAttribute("style", newStyle);
128
116
  }
129
117
  }
130
- });
118
+
119
+ socialCheesecake.Actor.prototype.isHidden = function() {
120
+ return this._hidden;
121
+ }
122
+
123
+ socialCheesecake.Actor.prototype.setDivOpacity = function(opacity) {
124
+ opacity = (opacity > 1) ? 1 : opacity;
125
+ opacity = (opacity < 0) ? 0 : opacity;
126
+ var actor = this;
127
+ var actor_div = this.getDiv();
128
+
129
+ this.opacity = opacity;
130
+ var newStyle="opacity: "+this.opacity + ";";
131
+
132
+ if (actor_div.getAttribute("style")){
133
+ newStyle = actor_div.getAttribute("style").replace(/opacity\s*:\s*[a-zA-Z0-9.]*;/g, "");
134
+ newStyle = newStyle.concat("opacity: "+this.opacity + ";");
135
+ }
136
+ actor_div.setAttribute("style", newStyle);
137
+ }
138
+
139
+ socialCheesecake.Actor.prototype.fade = function(time, modifyDisplay) {
140
+ var actor = this;
141
+ var deltaOpacity = 1000.0/ (60.0 *time);
142
+ var grow = 0;
143
+
144
+ var x = actor.opacity;
145
+ //console.log(">Fade actor "+ actor.id+" now with opacity "+ x);
146
+ //console.log(" >Fading value "+ this.fading);
147
+
148
+ if (this.fading == "out"){
149
+ grow = -1;
150
+ }else if (this.fading == "in"){
151
+ grow = 1;
152
+ if (modifyDisplay) actor.show();
153
+ }
154
+ var opacity = this.opacity + grow * deltaOpacity;
155
+ opacity = Math.round(opacity*1000)/1000;
156
+ actor.setDivOpacity(opacity);
157
+
158
+ if (((this.fading == "out") && (opacity >= 0))||
159
+ ((this.fading == "in") && (opacity <= 1))){
160
+ requestAnimFrame(function() {
161
+
162
+ actor.fade(time, modifyDisplay);
163
+ });
164
+ }else{
165
+ //console.log("STOP FADING Actor "+ actor.id + " now with opacity "+x);
166
+ //console.log(" >Fading value "+ this.fading);
167
+ this.fading = "none";
168
+ if((modifyDisplay) && (opacity <= 0)) actor.hide();
169
+ }
170
+ }
171
+
172
+ socialCheesecake.Actor.prototype.fadeOut = function(time, modifyDisplay) {
173
+ this.fading = "out";
174
+ this.fade(time, modifyDisplay);
175
+ }
176
+
177
+ socialCheesecake.Actor.prototype.fadeIn = function(time, modifyDisplay) {
178
+ this.fading = "in";
179
+ this.fade(time, modifyDisplay);
180
+ }
181
+
182
+ socialCheesecake.Actor.prototype.getCheesecake = function (){
183
+ return this.parents[0].parent.parent;
184
+ }
185
+
186
+ socialCheesecake.Actor.prototype.getDiv = function () {
187
+ var gridIdPrefix = this.getCheesecake().grid.divIdPrefix;
188
+ var actor_id = this.id;
189
+ var actor_div = document.getElementById(gridIdPrefix+actor_id);
190
+ return actor_div;
191
+ }
192
+
193
+ })();
131
194
 
@@ -1,11 +1,5 @@
1
- socialCheesecake.defineModule(
2
- 'SocialCheesecake#Cheesecake'
3
- )
4
- .dependsOn(
5
- 'SocialCheesecake#Sector',
6
- 'SocialCheesecake#Grid'
7
- )
8
- .withCode(function() {
1
+ var socialCheesecake = socialCheesecake || {};
2
+ (function() {
9
3
  socialCheesecake.Cheesecake = function(cheesecakeData) {
10
4
  var jsonSectors = cheesecakeData.sectors;
11
5
  var cheesecake = this;
@@ -43,18 +37,30 @@ socialCheesecake.defineModule(
43
37
  mouseover : {
44
38
  color : "#aaffaa",
45
39
  callback : function(sector) {
40
+ /* FIX FOR EXECUTING MOUSEOUT BEFORE MOUSEOVER */
41
+ for(var i in cheesecake.sectors){
42
+ cheesecake.sectors[i].getRegion().addEventListener("mouseout", undefined);
43
+ if(cheesecake.sectors[i]!= sector){
44
+ cheesecake.sectors[i].unfocus();
45
+ cheesecake.sectors[i].changeColor(cheesecake.sectors[i].mouseout.color);
46
+ }
47
+ }
48
+ sector.getRegion().addEventListener("mouseout", function() {
49
+ sector.eventHandler('mouseout');
50
+ });
51
+
46
52
  document.body.style.cursor = "pointer";
47
53
  cheesecake.grid.hideAll();
48
- for (var actor in sector.actors){
49
- sector.actors[actor].show();
50
- }
54
+ cheesecake.grid.fadeIn(sector.actors, 300, true);
55
+ sector.focus();
51
56
  }
52
57
  },
53
58
  mouseout : {
54
59
  color : "#eeffee",
55
60
  callback : function(sector) {
56
61
  document.body.style.cursor = "default";
57
- cheesecake.grid.showAll();
62
+ cheesecake.grid.fadeInAll(300, true);
63
+ sector.unfocus();
58
64
  }
59
65
  },
60
66
  mousedown : {
@@ -62,9 +68,7 @@ socialCheesecake.defineModule(
62
68
  callback : function(sector) {
63
69
  cheesecake.focusAndBlurCheesecake(sector);
64
70
  cheesecake.grid.hideAll();
65
- for (var actor in sector.actors){
66
- sector.actors[actor].show();
67
- }
71
+ cheesecake.grid.fadeIn(sector.actors,300, true);
68
72
  }
69
73
  },
70
74
  mouseup : { color : "#aaffaa" }
@@ -77,7 +81,7 @@ socialCheesecake.defineModule(
77
81
 
78
82
  socialCheesecake.Cheesecake.prototype.focusAndBlurCheesecake = function(sector) {
79
83
  var cheesecake = this;
80
- var regions = cheesecake.stage.shapes;
84
+ var regions = cheesecake.stage.getShapes();
81
85
  var sectorIndex;
82
86
  for(var i in cheesecake.sectors) {
83
87
  if(cheesecake.sectors[i] === sector) sectorIndex = i;
@@ -117,7 +121,8 @@ socialCheesecake.defineModule(
117
121
  document.body.style.cursor = "pointer";
118
122
  }
119
123
  },
120
- color : "#f5f5f5"
124
+ color : "#f5f5f5",
125
+ auxiliar : true
121
126
  };
122
127
  var dummySettings = {
123
128
  parent : cheesecake,
@@ -148,8 +153,6 @@ socialCheesecake.defineModule(
148
153
 
149
154
  cheesecake.stage.add(greySector.getRegion());
150
155
  cheesecake.stage.add(dummySector.getRegion());
151
- var greySectorContext = greySector.getRegion().getContext();
152
- var dummySectorContext = dummySector.getRegion().getContext();
153
156
 
154
157
  //Animations
155
158
  var greyMousedownCallback = function() {
@@ -161,7 +164,6 @@ socialCheesecake.defineModule(
161
164
  }
162
165
  var greyRotateToCallback = function() {
163
166
  greySector.resize({
164
- context : greySectorContext,
165
167
  delta : 3 * Math.PI / 2,
166
168
  anchor : "M",
167
169
  callback : greyResizeCallback
@@ -172,21 +174,18 @@ socialCheesecake.defineModule(
172
174
  }
173
175
  var dummyRotateToCallback = function() {
174
176
  dummySector.resize({
175
- context : dummySectorContext,
176
177
  anchor : "M",
177
178
  callback : dummyResizeCallback
178
179
  });
179
180
  }
180
181
 
181
182
  greySector.rotateTo({
182
- context : greySectorContext,
183
183
  destination : 5*Math.PI / 4,
184
184
  callback : greyRotateToCallback,
185
185
  anchor : "M"
186
186
  });
187
187
 
188
188
  dummySector.rotateTo({
189
- context : dummySectorContext,
190
189
  destination : Math.PI / 4 ,
191
190
  callback : dummyRotateToCallback,
192
191
  anchor : "M"
@@ -194,7 +193,7 @@ socialCheesecake.defineModule(
194
193
  }
195
194
  socialCheesecake.Cheesecake.prototype.recoverCheesecake = function() {
196
195
  var cheesecake = this;
197
- var regions = cheesecake.stage.shapes;
196
+ var regions = cheesecake.stage.getShapes();
198
197
 
199
198
  //Delete the auxiliar sectors
200
199
  for(var i = (regions.length - 1); i >= 0; i--) {
@@ -227,30 +226,26 @@ socialCheesecake.defineModule(
227
226
  //Animate and go back to the general view
228
227
  sector.putTogether();
229
228
  sector.resize({
230
- context : sector.getRegion().getContext(),
231
229
  anchor : "M",
232
230
  delta : sector.originalAttr.delta,
233
231
  callback : function() {
234
232
  sector.rotateTo({
235
- context : sector.getRegion().getContext(),
236
233
  destination : sector.originalAttr.phi
237
234
  });
238
235
  }
239
236
  });
240
237
  greySector.resize({
241
- context : greySector.getRegion().getContext(),
242
238
  anchor : "M",
243
239
  delta : greySector.originalAttr.delta,
244
240
  callback : function() {
245
241
  greySector.rotateTo({
246
- context : greySector.getRegion().getContext(),
247
- destination : greySector.originalAttr.phi,
248
- callback : function() {
242
+ destination : greySector.originalAttr.phi,
243
+ callback : function() {
249
244
  cheesecake.recoverCheesecake();
250
245
  }
251
246
  });
252
247
  }
253
248
  });
254
249
  }
255
- });
250
+ })();
256
251
 
@@ -1,13 +1,7 @@
1
- socialCheesecake.defineModule(
2
- 'SocialCheesecake#Grid'
3
- )
4
- .dependsOn(
5
- 'SocialCheesecake#Actor'
6
- )
7
- .withCode(function() {
1
+ var socialCheesecake = socialCheesecake || {};
2
+ (function() {
8
3
  socialCheesecake.Grid = function (settings){
9
4
  if (!settings) throw "No arguments passed to the function";
10
- console.log(settings.actors);
11
5
 
12
6
  //Actors dimensions and positions
13
7
  this.actors = [];
@@ -97,7 +91,7 @@ socialCheesecake.defineModule(
97
91
  }
98
92
 
99
93
  socialCheesecake.Grid.prototype.hideAll = function () {
100
- this.hide(this.actors)
94
+ this.hide(this.actors);
101
95
  }
102
96
 
103
97
  socialCheesecake.Grid.prototype.show = function (actor_ids) {
@@ -120,7 +114,7 @@ socialCheesecake.defineModule(
120
114
  }
121
115
 
122
116
  socialCheesecake.Grid.prototype.showAll = function () {
123
- this.show(this.actors)
117
+ this.show(this.actors);
124
118
  }
125
119
 
126
120
  socialCheesecake.Grid.prototype.unfocus = function (actor_ids) {
@@ -143,7 +137,54 @@ socialCheesecake.defineModule(
143
137
  }
144
138
 
145
139
  socialCheesecake.Grid.prototype.unfocusAll = function () {
146
- this.unfocus(this.actors)
140
+ this.unfocus(this.actors);
147
141
  }
148
- });
142
+
143
+ socialCheesecake.Grid.prototype.fadeOut = function (actor_ids, time, modifyDisplay) {
144
+ if (actor_ids instanceof Array) {
145
+ for(var i in actor_ids){
146
+ var actor = actor_ids[i];
147
+ if(actor instanceof socialCheesecake.Actor){
148
+ actor.fadeOut(time, modifyDisplay);
149
+ }else{
150
+ this.getActor(actor).fadeOut(time, modifyDisplay);
151
+ }
152
+ }
153
+ } else {
154
+ if(actor_ids instanceof socialCheesecake.Actor){
155
+ actor_ids.fadeOut(time, modifyDisplay);
156
+ }else{
157
+ this.getActor(actor_ids).fadeOut(time, modifyDisplay);
158
+ }
159
+ }
160
+ }
161
+
162
+ socialCheesecake.Grid.prototype.fadeOutAll = function (time, modifyDisplay) {
163
+ this.fadeOut(this.actors, time, modifyDisplay);
164
+ }
165
+
166
+ socialCheesecake.Grid.prototype.fadeIn = function (actor_ids, time, modifyDisplay) {
167
+ if (actor_ids instanceof Array) {
168
+ for(var i in actor_ids){
169
+ var actor = actor_ids[i];
170
+ if(actor instanceof socialCheesecake.Actor){
171
+ actor.fadeIn(time, modifyDisplay);
172
+ }else{
173
+ this.getActor(actor).fadeIn(time, modifyDisplay);
174
+ }
175
+ }
176
+ } else {
177
+ if(actor_ids instanceof socialCheesecake.Actor){
178
+ actor_ids.fadeIn(time, modifyDisplay);
179
+ }else{
180
+ this.getActor(actor_ids).fadeIn(time, modifyDisplay);
181
+ }
182
+ }
183
+ }
184
+
185
+ socialCheesecake.Grid.prototype.fadeInAll = function (time, modifyDisplay) {
186
+ this.fadeIn(this.actors, time, modifyDisplay);
187
+ }
188
+
189
+ })();
149
190