diff --git a/projects/angular-gridster2/src/lib/gridsterCompact.service.ts b/projects/angular-gridster2/src/lib/gridsterCompact.service.ts
index 25d92e2c..c1969fac 100644
--- a/projects/angular-gridster2/src/lib/gridsterCompact.service.ts
+++ b/projects/angular-gridster2/src/lib/gridsterCompact.service.ts
@@ -32,6 +32,20 @@ export class GridsterCompact {
} else if (this.gridster.$options.compactType === CompactType.CompactRightAndUp) {
this.checkCompactMovement('x', 1);
this.checkCompactMovement('y', -1);
+ } else if (this.gridster.$options.compactType === CompactType.CompactDown) {
+ this.checkCompactMovement('y', 1);
+ } else if (this.gridster.$options.compactType === CompactType.CompactDownAndLeft) {
+ this.checkCompactMovement('y', 1);
+ this.checkCompactMovement('x', -1);
+ } else if (this.gridster.$options.compactType === CompactType.CompactDownAndRight) {
+ this.checkCompactMovement('y', 1);
+ this.checkCompactMovement('x', 1);
+ } else if (this.gridster.$options.compactType === CompactType.CompactLeftAndDown) {
+ this.checkCompactMovement('x', -1);
+ this.checkCompactMovement('y', 1);
+ } else if (this.gridster.$options.compactType === CompactType.CompactRightAndDown) {
+ this.checkCompactMovement('x', 1);
+ this.checkCompactMovement('y', 1);
}
}
}
@@ -51,6 +65,20 @@ export class GridsterCompact {
} else if (this.gridster.$options.compactType === CompactType.CompactUpAndRight) {
this.moveTillCollision(item, 'y', -1);
this.moveTillCollision(item, 'x', 1);
+ } else if (this.gridster.$options.compactType === CompactType.CompactDown) {
+ this.moveTillCollision(item, 'y', 1);
+ } else if (this.gridster.$options.compactType === CompactType.CompactDownAndLeft) {
+ this.moveTillCollision(item, 'y', 1);
+ this.moveTillCollision(item, 'x', -1);
+ } else if (this.gridster.$options.compactType === CompactType.CompactLeftAndDown) {
+ this.moveTillCollision(item, 'x', -1);
+ this.moveTillCollision(item, 'y', 1);
+ } else if (this.gridster.$options.compactType === CompactType.CompactDownAndRight) {
+ this.moveTillCollision(item, 'y', 1);
+ this.moveTillCollision(item, 'x', 1);
+ } else if (this.gridster.$options.compactType === CompactType.CompactRightAndDown) {
+ this.moveTillCollision(item, 'x', 1);
+ this.moveTillCollision(item, 'y', 1);
}
}
}
diff --git a/projects/angular-gridster2/src/lib/gridsterConfig.interface.ts b/projects/angular-gridster2/src/lib/gridsterConfig.interface.ts
index eb642a52..ae7b00ff 100644
--- a/projects/angular-gridster2/src/lib/gridsterConfig.interface.ts
+++ b/projects/angular-gridster2/src/lib/gridsterConfig.interface.ts
@@ -11,7 +11,12 @@ export type compactTypes =
| 'compactLeft&Up'
| 'compactRight'
| 'compactUp&Right'
- | 'compactRight&Up';
+ | 'compactRight&Up'
+ | 'compactDown'
+ | 'compactDown&Left'
+ | 'compactLeft&Down'
+ | 'compactDown&Right'
+ | 'compactRight&Down';
export enum GridType {
Fit = 'fit',
@@ -37,6 +42,11 @@ export enum CompactType {
CompactRight = 'compactRight',
CompactUpAndRight = 'compactUp&Right',
CompactRightAndUp = 'compactRight&Up',
+ CompactDown = 'compactDown',
+ CompactDownAndLeft = 'compactDown&Left',
+ CompactLeftAndDown = 'compactLeft&Down',
+ CompactDownAndRight = 'compactDown&Right',
+ CompactRightAndDown = 'compactRight&Down'
}
export enum DirTypes {
diff --git a/src/app/sections/compact/compact.component.html b/src/app/sections/compact/compact.component.html
index f440acd2..63db5279 100644
--- a/src/app/sections/compact/compact.component.html
+++ b/src/app/sections/compact/compact.component.html
@@ -18,6 +18,11 @@
Compact Right
Compact Up & Right
Compact Right & Up
+ Compact Down
+ Compact Down & Left
+ Compact Left & Down
+ Compact Down & Right
+ Compact Right & Down