Skip to content
This repository has been archived by the owner on Dec 2, 2021. It is now read-only.

Commit

Permalink
Made it possible to use the view width/height inside equal spacers (~…
Browse files Browse the repository at this point in the history
…(view1)~)
  • Loading branch information
IjzerenHein committed Jul 28, 2015
1 parent 47dadaf commit 278804d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/VisualFormat.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ function _processEqualSpacer(context, stackView) {
}
context.equalSpacerIndex++;

// Enforce proportional width/height
if (context.relation.multiplier && (context.relation.multiplier !== 1)) {
// Enforce view/proportional width/height
if (context.relation.view || (context.relation.multiplier && (context.relation.multiplier !== 1))) {
context.constraints.push({
view1: name,
attr1: context.horizontal ? Attribute.WIDTH : Attribute.HEIGHT,
relation: context.relation.relation || Relation.EQU,
view2: null,
view2: context.relation.view,
attr2: context.horizontal ? Attribute.WIDTH : Attribute.HEIGHT,
priority: context.relation.priority,
multiplier: context.relation.multiplier
Expand Down

0 comments on commit 278804d

Please sign in to comment.