Skip to content

Commit

Permalink
Undo the constraints helper simplification for the meantime.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwiggins authored and brett-patterson committed Jun 25, 2014
1 parent f97d88b commit 9650b41
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
6 changes: 0 additions & 6 deletions enable/layout/layout_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1234,7 +1234,6 @@ def horizontal(*items, **config):
abutments for the given sequence of items.
"""
items = [item.constraints for item in items]
return AbutmentHelper('horizontal', *items, **config)


Expand All @@ -1243,7 +1242,6 @@ def vertical(*items, **config):
abutments for the given sequence of items.
"""
items = [item.constraints for item in items]
return AbutmentHelper('vertical', *items, **config)


Expand All @@ -1252,7 +1250,6 @@ def hbox(*items, **config):
abutments for a given sequence of items.
"""
items = [item.constraints for item in items]
return LinearBoxHelper('horizontal', *items, **config)


Expand All @@ -1261,7 +1258,6 @@ def vbox(*items, **config):
for a given sequence of items.
"""
items = [item.constraints for item in items]
return LinearBoxHelper('vertical', *items, **config)


Expand All @@ -1270,7 +1266,6 @@ def align(anchor, *items, **config):
spacing is allowed.
"""
items = [item.constraints for item in items]
return AlignmentHelper(anchor, *items, **config)


Expand All @@ -1279,7 +1274,6 @@ def grid(*rows, **config):
grid.
"""
rows = [[item.constraints for item in items] for items in rows]
return GridHelper(*rows, **config)


Expand Down
9 changes: 6 additions & 3 deletions examples/enable/constraints_demo.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,12 @@ def _canvas_default(self):

parent.add(one, two, three, four)
parent.layout_constraints = [
grid([one, two], [three, four]),
align('height', one, two, three, four),
align('width', one, two, three, four),
grid([one.constraints, two.constraints],
[three.constraints, four.constraints]),
align('height', one.constraints, two.constraints,
three.constraints, four.constraints),
align('width', one.constraints, two.constraints,
three.constraints, four.constraints),
]

return parent
Expand Down

0 comments on commit 9650b41

Please sign in to comment.