wannabegeek / ng2-split-pane

Split View module for Angular 2
MIT License
43 stars 25 forks source link

Specify initial split #2

Closed cpa-level-it closed 7 years ago

cpa-level-it commented 7 years ago

It would be great to be able to specify an initial split between the component.

I was able to do this via CSS using the following rules (in an angular-cli project)


:host /deep/ .v-outer .left-component {
    width: calc(80% - 4px);
}

:host /deep/ .v-outer .right-component {
    width: calc(20% - 4px);
}

But having a parameter like primary-component-minsize would be a nice addition I think. Great lib by the way.

wannabegeek commented 7 years ago

Thats a good idea & simple to implement.

wannabegeek commented 7 years ago

I have pushed a new version (1.0.5) to npm and github with an implementation of this.

plnkr has also been updated for this version: https://embed.plnkr.co/bxgcK29PNl9lexw6z6Ym/

cpa-level-it commented 7 years ago

Nice that was fast !