Added clickDragger improvements to pinned panel as well
This commit is contained in:
parent
41e70ff3cf
commit
29fb28ad5f
3 changed files with 36 additions and 3 deletions
|
|
@ -561,7 +561,7 @@ class canopyUXUtils{
|
|||
}
|
||||
|
||||
static clickDragger = class{
|
||||
constructor(handle, element, leftHandle = true, parent, flex = true, sizeLimit = 100, limitTolerance = 0.1, fillContainer = false){
|
||||
constructor(handle, element, leftHandle = true, parent, flex = true, sizeLimit = 100, limitTolerance = 0.1, fillContainer = false, fillAmount = "100%"){
|
||||
//Pull needed nodes
|
||||
this.handle = document.querySelector(handle);
|
||||
this.element = document.querySelector(element);
|
||||
|
|
@ -593,6 +593,9 @@ class canopyUXUtils{
|
|||
//Create boolean to allow dragger element to fill container when size limit is hit
|
||||
this.fillContainer = fillContainer;
|
||||
|
||||
//Create string to hold amount to fill container by
|
||||
this.fillAmount = fillAmount;
|
||||
|
||||
//Setup our event listeners
|
||||
this.setupInput();
|
||||
}
|
||||
|
|
@ -736,7 +739,7 @@ class canopyUXUtils{
|
|||
|
||||
setElementWidth(width){
|
||||
//If final width is true and we're hitting the size limit set final width to 100%, otherwise just hand it the raw value
|
||||
let finalWidth = (this.fillContainer && width == this.sizeLimit) ? "100%" : `${width}vw`
|
||||
let finalWidth = (this.fillContainer && width == this.sizeLimit) ? this.fillAmount : `${width}vw`
|
||||
|
||||
//If this is a flex
|
||||
if(this.flex){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue