not really known
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

40 lines
1.1 KiB

  1. /**
  2. _enyo.FittableRows_ provides a container in which items are laid out in a
  3. set of horizontal rows, with most of the items having natural size, but one
  4. expanding to fill the remaining space. The one that expands is labeled with
  5. the attribute _fit: true_.
  6. For example, the following code will align three components as rows, with
  7. the second filling the available container space between the first and third.
  8. enyo.kind({
  9. kind: "FittableRows",
  10. components: [
  11. {content: "1"},
  12. {content: "2", fit:true},
  13. {content: "3"}
  14. ]
  15. });
  16. Alternatively, you may set a kind's _layoutKind_ property to
  17. <a href="#enyo.FittableRowsLayout">enyo.FittableRowsLayout</a>
  18. to use a different base kind while still employing the fittable layout
  19. strategy, e.g.:
  20. enyo.kind({
  21. kind: enyo.Control,
  22. layoutKind: "FittableRowsLayout",
  23. components: [
  24. {content: "1"},
  25. {content: "2", fit:true},
  26. {content: "3"}
  27. ]
  28. });
  29. */
  30. enyo.kind({
  31. name: "enyo.FittableRows",
  32. layoutKind: "FittableRowsLayout",
  33. /** By default, items in rows stretch to fit horizontally; set to true to
  34. avoid this behavior. */
  35. noStretch: false
  36. });