0.0.3 • Published 5 years ago

ember-split-view-modifier v0.0.3

Weekly downloads
5
License
MIT
Repository
github
Last release
5 years ago

ember-split-view-modifier Ember Observer Score npm version travis status

Ember element modifier {{split-view}} that turns all child elements into resizeable split views. It uses Split.js under the hood. DEMO

Installation

ember install ember-split-view-modifier

Usage

<div {{split-view sizes=(array 25 25 50)}} class="your-container-class">
  <div></div>
  <div></div>
  <div></div>
</div>

Configuration

The modifier accepts the following options:

OptionsTypeDefaultDescription
sizesArrayInitial sizes of each element in percents or CSS values.
minSizeNumber or Array100Minimum size of each element.
expandToMinBooleanfalseGrow initial sizes to minSize
gutterSizeNumber10Gutter size in pixels.
gutterAlignString'center'Gutter alignment between elements.
snapOffsetNumber30Snap to minimum size offset in pixels.
dragIntervalNumber1Number of pixels to drag.
directionString'horizontal'Direction to split: horizontal or vertical.
cursorString'col-resize'Cursor to display while dragging.
gutterFunctionCalled to create each gutter element
elementStyleFunctionCalled to set the style of each element.
gutterStyleFunctionCalled to set the style of the gutter.
onDragFunctionCallback on drag.
onDragStartFunctionCallback on drag start.
onDragEndFunctionCallback on drag end.

Refer to Split.js documentation for more details.

License

This project is licensed under the MIT License.