diff --git a/demo/sizeToContent.html b/demo/sizeToContent.html
index d7c912411..b60c2245f 100644
--- a/demo/sizeToContent.html
+++ b/demo/sizeToContent.html
@@ -51,7 +51,7 @@
Cell sizeToContent options demo
{x:2, y:0, w:1, h:2, content: 'B: shrink h=2
'}, // make taller than needed upfront
{x:3, y:0, w:2, sizeToContent: false, content: `C: WILL SCROLL. ${text}
`}, // prevent this from fitting testing
{x:0, y:1, w:3, content: `D no h: ${text} ${text}
`},
- ];
+ {x:3, y:1, w:2, sizeToContent:3, content: `E sizeToContent=3
${text} ${text} ${text}
`} ];
grid.load(items);
function column(n) {
@@ -70,6 +70,21 @@ Cell sizeToContent options demo
grid.el.appendChild(el);
grid.makeWidget(el);
}
+ function more() {
+ let cont = document.getElementById('dynContent');
+ if (!cont) return;
+ cont.innerHTML += cont.innerHTML;
+ let el = cont.parentElement.parentElement.parentElement;
+ grid.resizeToContent(el)
+ }
+ function less() {
+ let cont = document.getElementById('dynContent');
+ if (!cont) return;
+ let content = cont.innerHTML;
+ cont.innerHTML = content.substring(0, content.length/2);
+ let el = cont.parentElement.parentElement.parentElement;
+ grid.resizeToContent(el);
+ }