Fix userlist to properly handle longboi usernames
This commit is contained in:
parent
b853d75836
commit
7fb981d778
|
|
@ -20,7 +20,7 @@ class userList{
|
|||
this.client = client
|
||||
|
||||
//Click Dragger Object
|
||||
this.clickDragger = new canopyUXUtils.clickDragger("#chat-panel-users-drag-handle", "#chat-panel-users-div");
|
||||
this.clickDragger = new canopyUXUtils.clickDragger("#chat-panel-users-drag-handle", "#chat-panel-users-div", true, this.client.chatBox.clickDragger);
|
||||
|
||||
//Strings
|
||||
this.userColors = [
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ class canopyUXUtils{
|
|||
}
|
||||
|
||||
static clickDragger = class{
|
||||
constructor(handle, element, leftHandle = true){
|
||||
constructor(handle, element, leftHandle = true, parent){
|
||||
//Pull needed nodes
|
||||
this.handle = document.querySelector(handle);
|
||||
this.element = document.querySelector(element);
|
||||
|
|
@ -165,6 +165,9 @@ class canopyUXUtils{
|
|||
//Little hacky but it could be worse :P
|
||||
this.fixWidth = false;
|
||||
|
||||
//we put a click dragger in yo click dragger so you could click and drag while you click and drag
|
||||
this.parent = parent;
|
||||
|
||||
//Setup our event listeners
|
||||
this.setupInput();
|
||||
}
|
||||
|
|
@ -244,6 +247,12 @@ class canopyUXUtils{
|
|||
//call end drag to finish the job
|
||||
this.endDrag();
|
||||
}
|
||||
|
||||
//If we have a parent dragger
|
||||
if(this.parent != null){
|
||||
//Make sure to fix it's cutoff too
|
||||
this.parent.fixCutoff();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue