Added property to prevent larger widget shifting

This commit is contained in:
Dustin Moore
2012-11-20 10:16:19 -08:00
parent 898b77d2d3
commit 67465875aa
5 changed files with 23 additions and 11 deletions
+7 -3
View File
@@ -715,6 +715,7 @@
max_size_x: 6,
autogenerate_stylesheet: true,
avoid_overlapped_widgets: true,
shift_larger_widgets_down: true,
serialize_params: function($w, wgd) {
return {
col: wgd.col,
@@ -1641,10 +1642,13 @@
}));
var constraints = this.widgets_constraints($overlapped_widgets);
//If set to false smaller widgets will not displace larger widgets.
if(this.options.shift_larger_widgets_down){
var constraints = this.widgets_constraints($overlapped_widgets);
this.manage_movements(constraints.can_go_up, to_col, to_row);
this.manage_movements(constraints.can_not_go_up, to_col, to_row);
this.manage_movements(constraints.can_go_up, to_col, to_row);
this.manage_movements(constraints.can_not_go_up, to_col, to_row);
}
/* if there is not widgets overlapping in the new player position,
+1 -1
View File
File diff suppressed because one or more lines are too long
+7 -3
View File
@@ -715,6 +715,7 @@
max_size_x: 6,
autogenerate_stylesheet: true,
avoid_overlapped_widgets: true,
shift_larger_widgets_down: true,
serialize_params: function($w, wgd) {
return {
col: wgd.col,
@@ -1641,10 +1642,13 @@
}));
var constraints = this.widgets_constraints($overlapped_widgets);
//If set to false smaller widgets will not displace larger widgets.
if(this.options.shift_larger_widgets_down){
var constraints = this.widgets_constraints($overlapped_widgets);
this.manage_movements(constraints.can_go_up, to_col, to_row);
this.manage_movements(constraints.can_not_go_up, to_col, to_row);
this.manage_movements(constraints.can_go_up, to_col, to_row);
this.manage_movements(constraints.can_not_go_up, to_col, to_row);
}
/* if there is not widgets overlapping in the new player position,
File diff suppressed because one or more lines are too long
+7 -3
View File
@@ -19,6 +19,7 @@
max_size_x: 6,
autogenerate_stylesheet: true,
avoid_overlapped_widgets: true,
shift_larger_widgets_down: true,
serialize_params: function($w, wgd) {
return {
col: wgd.col,
@@ -945,10 +946,13 @@
}));
var constraints = this.widgets_constraints($overlapped_widgets);
//If set to false smaller widgets will not displace larger widgets.
if(this.options.shift_larger_widgets_down){
var constraints = this.widgets_constraints($overlapped_widgets);
this.manage_movements(constraints.can_go_up, to_col, to_row);
this.manage_movements(constraints.can_not_go_up, to_col, to_row);
this.manage_movements(constraints.can_go_up, to_col, to_row);
this.manage_movements(constraints.can_not_go_up, to_col, to_row);
}
/* if there is not widgets overlapping in the new player position,