diff --git a/README.md b/README.md
index ec2e4b6..dd35b7f 100644
--- a/README.md
+++ b/README.md
@@ -27,7 +27,7 @@ export function configure(aurelia: Aurelia) {
Item1
-
+
Item2
diff --git a/packages/aurelia-gridstack/src/elements/grid-stack-item/grid-stack-item.ts b/packages/aurelia-gridstack/src/elements/grid-stack-item/grid-stack-item.ts
index cf971fe..d5e0aed 100644
--- a/packages/aurelia-gridstack/src/elements/grid-stack-item/grid-stack-item.ts
+++ b/packages/aurelia-gridstack/src/elements/grid-stack-item/grid-stack-item.ts
@@ -50,6 +50,56 @@ export class GridStackItem {
this.root.removeAttribute('gs-h');
}
}
+
+ @bindable.number({ defaultBindingMode: bindingMode.twoWay })
+ minW?: number;
+ minWChanged() {
+ if (this.minW !== undefined) {
+ this.root.setAttribute("gs-min-w", this.minW.toString());
+ } else {
+ this.root.removeAttribute("gs-min-w");
+ }
+ }
+
+ @bindable.number({ defaultBindingMode: bindingMode.twoWay })
+ minH?: number;
+ minHChanged() {
+ if (this.minH !== undefined) {
+ this.root.setAttribute("gs-min-h", this.minH.toString());
+ } else {
+ this.root.removeAttribute("gs-min-h");
+ }
+ }
+
+ @bindable.number({ defaultBindingMode: bindingMode.twoWay })
+ maxW?: number;
+ maxWChanged() {
+ if (this.maxW !== undefined) {
+ this.root.setAttribute("gs-max-w", this.maxW.toString());
+ } else {
+ this.root.removeAttribute("gs-max-w");
+ }
+ }
+
+ @bindable.number({ defaultBindingMode: bindingMode.twoWay })
+ maxH?: number;
+ maxHChanged() {
+ if (this.maxH !== undefined) {
+ this.root.setAttribute("gs-max-h", this.maxH.toString());
+ } else {
+ this.root.removeAttribute("gs-max-h");
+ }
+ }
+
+ @bindable.number({ defaultBindingMode: bindingMode.twoWay })
+ id?: number;
+ idChanged() {
+ if (this.id !== undefined) {
+ this.root.setAttribute("gs-id", this.id.toString());
+ } else {
+ this.root.removeAttribute("gs-id");
+ }
+ }
@bindable.booleanAttr
noMove: boolean;