Added proper handling of items that begin late and end early.
This commit is contained in:
parent
330c4c275b
commit
179a10fb72
5 changed files with 286 additions and 69 deletions
|
|
@ -553,7 +553,19 @@ class canopyUXUtils{
|
|||
}
|
||||
|
||||
|
||||
fixCutoff(standalone = true, pageBreak = document.body.scrollWidth - document.body.getBoundingClientRect().width){
|
||||
fixCutoff(standalone = true, pageBreak){
|
||||
//If we have no pagebreak
|
||||
if(pageBreak == null){
|
||||
//If we have a document body
|
||||
if(document.body != null){
|
||||
pageBreak = document.body.scrollWidth - document.body.getBoundingClientRect().width
|
||||
//Otherwise
|
||||
}else{
|
||||
//Pretend nothing happened because we probably have bigger issues then a fucked up click-dragger cutoff
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
//Fix the page width
|
||||
if(this.flex){
|
||||
this.element.style.flexBasis = `${this.calcWidth(this.element.getBoundingClientRect().width + pageBreak)}vw`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue