3 Polymer('core-splitter',Polymer.mixin({
6 * Possible values are `left`, `right`, `up` and `down`.
15 * Minimum width to which the splitter target can be sized, e.g.
25 * Locks the split bar so it can't be dragged.
34 * By default the parent and siblings of the splitter are set to overflow hidden. This helps
35 * avoid elements bleeding outside the splitter regions. Set this property to true to allow
36 * these elements to overflow.
38 * @attribute allowOverflow
44 // Listen for resize requests on parent, since splitter is peer to resizables
48 this.directionChanged();
51 attached: function() {
52 this.resizerAttachedHandler();
55 detached: function() {
56 this.resizerDetachedHandler();
59 domReady: function() {
60 if (!this.allowOverflow) {
61 this.parentNode.style.overflow = this.nextElementSibling.style.overflow =
62 this.previousElementSibling.style.overflow = 'hidden';
66 directionChanged: function() {
67 this.isNext = this.direction === 'right' || this.direction === 'down';
68 this.horizontal = this.direction === 'up' || this.direction === 'down';
73 this.target = this.isNext ? this.nextElementSibling : this.previousElementSibling;
74 this.dimension = this.horizontal ? 'height' : 'width';
75 this.classList.toggle('horizontal', this.horizontal);
78 targetChanged: function(old) {
80 old.style[old.__splitterMinSize] = '';
82 var min = this.target.__splitterMinSize = this.horizontal ? 'minHeight' : 'minWidth';
83 this.target.style[min] = this.minSize;
86 trackStart: function() {
88 this.size = parseInt(getComputedStyle(this.target)[this.dimension]);
95 var d = e[this.horizontal ? 'dy' : 'dx'];
96 this.target.style[this.dimension] =
97 this.size + (this.isNext ? -d : d) + 'px';
101 preventSelection: function(e) {
105 }, Polymer.CoreResizer));