Sha256: 707ac9a49c60a68ad1443ecbb1fb34478621a102796cfc2ec738509df63c46b1
Contents?: true
Size: 681 Bytes
Versions: 25
Compression:
Stored size: 681 Bytes
Contents
import Split from "split-grid"; export default function splitter(direction, props = {}) { return { splits: [], init() { const type = `${direction === "vertical" ? "column" : "row"}Gutters`; const element = this.$el; Split({ [type]: [{ track: 1, element }], minSize: props.minSize || 0, writeStyle() {}, onDrag: (dir, track, style) => { this.splits = style.split(" ").map((num) => parseFloat(num, 10)); }, onDragStart: () => { this.$store.layout.reflowing = true; }, onDragEnd: () => { this.$store.layout.reflowing = false; }, }); }, }; }
Version data entries
25 entries across 25 versions & 1 rubygems