Problem with size in percentage
See original GitHub issueDescribe the bug When manipulating the “size” attribute, it starts to behave weirdly. When I drag one column, it does it perfectly, but when I try to drag the same one (again) or another one, it does not respond to the mouse drag movement. After making a click on the gutter, then it starts working again. Why is this happening? It did not happen in the previous version. I just updated today.
To Reproduce
<as-split [direction]="direction" [gutterSize]="columnSeparatorWidth" (gutterClick)="hideColumn($event)"
(dragStart)="dragStart($event)" (dragEnd)="columnResized($event)" #mySplitA
[unit]="'percent'">
<as-split-area [size]="columns.pending.width">
</as-split-area>
<as-split-area [size]="columns.editor.width">
</as-split-area>
<as-split-area [size]="columns.live.width">
</as-split-area>
</as-split>
columnResized(event: any) {
if (event.sizes[0] > 0) {
this.columns.pending.width_aux = event.sizes[0];
}
this.columns.pending.width = event.sizes[0];
if (event.sizes[1] > 0) {
this.columns.editor.width_aux = event.sizes[1];
}
this.columns.editor.width = event.sizes[1];
if (event.sizes[2] > 0) {
this.columns.live.width_aux = event.sizes[2];
}
this.columns.live.width = event.sizes[2];
}
If I comment these lines:
this.columns.pending.width = event.sizes[0];
this.columns.editor.width = event.sizes[1];
this.columns.live.width = event.sizes[2];
It starts working. But I need to assign these values and I need them to be attached to the size attribute in the view.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Why would I ever NOT use percentage for sizes?
I think the major problem with percentages is that the question always comes down to "percentage to what?". To the viewport? To the...
Read more >Problem with fixed width layouts and percentage based widths
While designing fixed width layouts it is advantageous to use percentage based width for inner containers in the layout to make it easy...
Read more >Css height in percent not working [duplicate] - Stack Overflow
For an element to have a relative height it has to have a parent element with a specified size, for it's own size...
Read more >Sample Size Needed to Estimate a Percentage ... - YouTube
... thank you!!! https://goo.gl/JQ8NysSample Size Needed to Estimate a Percentage with StatCrunch Given the Margin of Error.
Read more >Finding the Sample Size needed to Estimate a Percentage ...
Please Subscribe here, thank you!!! https://goo.gl/JQ8NysFinding the Sample Size needed to Estimate a Percentage given the Margin of Error ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@bertrandg here it is: app: https://angular-dx5xhi.stackblitz.io/ editor: https://stackblitz.com/edit/angular-dx5xhi
Updated! Works great. Thank you very much.