Closed aslamkam closed 7 years ago
I 100% agree with this. Would have many advantages!
@aslamkam
FOUND SOLUTION:
import {HorizontalSplitPaneComponent} from "ng2-split-pane/lib/horizontal-split-pane.component";
...
in the component you have the split pane inside:
@ViewChild(HorizontalSplitPaneComponent) splitComponent: HorizontalSplitPaneComponent;
public testSizeChange(): void {
console.log('getTotalSize', this.splitComponent.getTotalSize());
console.log('getPrimarySize', this.splitComponent.getPrimarySize());
console.log('getSecondarySize', this.splitComponent.getSecondarySize());
this.splitComponent.applySizeChange(200) // px of the primary component
}
there is also a this.splitComponent.dividerPosition(250)
EDIT: the get functions will get height or width depending on the Horizontal vs Vertical
Thanks a lot for showing me the functions. Since the docs didn't contain these functions, I assumed they didn't exist.
Say you want the divider 200px from the left so that the primary component is 200px wide. i.e. resizeDivider(200)