Skip to content
This repository has been archived by the owner on Mar 13, 2018. It is now read-only.

Commit

Permalink
minSize now takes an actual min-height/width css value; fixes #8
Browse files Browse the repository at this point in the history
  • Loading branch information
frankiefu committed Sep 2, 2014
1 parent 750ed25 commit 059873d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
15 changes: 8 additions & 7 deletions core-splitter.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
since the parent container is a flexbox and the _right_ element has
`flex`, the _right_ element will be auto-resized.
For horizontal splitter set `direction` to "up" or "down".
For horizontal splitter set `direction` to `up` or `down`.
Example:
Expand Down Expand Up @@ -56,7 +56,7 @@
Polymer('core-splitter', {

/**
* Possible values are "left", "right", "up" and "down".
* Possible values are `left`, `right`, `up` and `down`.
*
* @attribute direction
* @type string
Expand All @@ -65,13 +65,14 @@
direction: 'left',

/**
* Minimum width to which the splitter target can be sized
* Minimum width to which the splitter target can be sized, e.g.
* `minSize="100px"`
*
* @attribute minSize
* @type number
* @default 0
* @type string
* @default ''
*/
minSize: 0,
minSize: '',

/**
* Locks the split bar so it can't be dragged.
Expand Down Expand Up @@ -121,7 +122,7 @@
old.style[old.__splitterMinSize] = '';
}
var min = this.target.__splitterMinSize = this.horizontal ? 'minHeight' : 'minWidth';
this.target.style[min] = this.minSize + 'px';
this.target.style[min] = this.minSize;
},

trackStart: function() {
Expand Down
2 changes: 1 addition & 1 deletion demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<body unresolved>
<div class="container" horizontal layout>
<div>left</div>
<core-splitter direction="left" minSize="128"></core-splitter>
<core-splitter direction="left" minSize="128px"></core-splitter>
<div flex>right</div>
</div>

Expand Down

0 comments on commit 059873d

Please sign in to comment.