@@ -531,9 +531,17 @@ TODO add example of exclusion usage.
531
531
<pre class="idl">
532
532
partial interface ConstraintSpace {
533
533
// TODO add arguments to layoutOpportunities that make sense.
534
- ConstraintSpaceIterable layoutOpportunities();
534
+ ConstraintSpaceIterable layoutOpportunities(optional LayoutOpportunitiesOptions );
535
535
};
536
536
537
+ dictionary LayoutOpportunitiesOptions {
538
+ optional sequence<ExclusionTag> avoid = «»; // empty list is avoid everything. :)
539
+ optional sequence<ExclusionTag> clear = «»; // defaults to clear nothing.
540
+ optional number jump; // defaults to 1em.
541
+ };
542
+
543
+ enum LayoutDirection { "inline", "block" };
544
+
537
545
// TODO should be a generator function instead?
538
546
interface ConstraintSpaceIterable {
539
547
iterable<DerivedConstraintSpace>;
@@ -560,7 +568,18 @@ The {{ConstraintSpace/inlineSize}} and {{ConstraintSpace/blockSize}} attributes
560
568
{{ConstraintSpace/inlinePercentResolutionSize}} and {{ConstraintSpace/blockPercentResolutionSize}}
561
569
should remain the same as the parent.
562
570
563
- The {{DerivedConstraintSpace}} is used for "fitting" a child within a larger {{ConstraintSpace}} .
571
+ The {{ConstraintSpace/layoutOpportunities()}} method takes an optional dictionary
572
+ {{LayoutOpportunitiesOptions}} .
573
+
574
+ The {{LayoutOpportunitiesOptions/clear}} property is similar to the ''clear'' property. The returned
575
+ generator will only return {{DerivedConstraintSpace}} s which lower (in the block direction) that any
576
+ types of exclusions listed.
577
+
578
+ The {{LayoutOpportunitiesOptions/avoid}} property will return {{DerivedConstraintSpace}} s which wont
579
+ have the listed exclusion types inside them.
580
+
581
+ The {{LayoutOpportunitiesOptions/jump}} property allows authors to specify the minimum jump for
582
+ non-rectangular exclusions.
564
583
565
584
Issue: Add image showing a child "fitting" within a larger {{ConstraintSpace}} .
566
585
0 commit comments