Search code examples
javascriptcssfamo.us

How to make Surface size to fit text content


I followed this guide here

http://famo.us/guides/dev/layout.html

Most examples show the size either as undefined meaning it's max width/height or as fixed pixel number.

Is there a way to specific the size so that it wrapped and fitted the content text instead?


Solution

  • I found the answer. You need to set true as the value instead. For example

    size: [undefined, true]