Started work on personal emotes.

This commit is contained in:
rainbow napkin 2024-12-22 13:46:08 -05:00
parent db5fac83ab
commit a4a1f6a65b
16 changed files with 248 additions and 18 deletions

View file

@ -73,7 +73,11 @@ class cPanel{
this.activePanel.docSwitch();
}
hideActivePanel(){
hideActivePanel(event, keepAlive = false){
if(!keepAlive){
this.activePanel.closer();
}
//Hide the panel
this.activePanelDiv.style.display = "none";
//Clear out the panel
@ -84,12 +88,12 @@ class cPanel{
pinPanel(){
this.setPinnedPanel(this.activePanel, this.activePanelDoc.innerHTML);
this.hideActivePanel();
this.hideActivePanel(null, true);
}
popActivePanel(){
this.popPanel(this.activePanel, this.activePanelDoc.innerHTML);
this.hideActivePanel();
this.hideActivePanel(null, true);
}
async setPinnedPanel(panel, panelBody){
@ -113,19 +117,24 @@ class cPanel{
this.pinnedPanelDragger.fixCutoff();
}
hidePinnedPanel(){
hidePinnedPanel(event, keepAlive = false){
this.pinnedPanelDiv.style.display = "none";
if(!keepAlive){
this.pinnedPanel.closer();
}
this.pinnedPanel = null;
}
unpinPanel(){
this.setActivePanel(this.pinnedPanel, this.pinnedPanelDoc.innerHTML);
this.hidePinnedPanel();
this.hidePinnedPanel(null, true);
}
popPinnedPanel(){
this.popPanel(this.pinnedPanel, this.pinnedPanelDoc.innerHTML);
this.hidePinnedPanel();
this.hidePinnedPanel(null, true);
}
popPanel(panel, panelBody){
@ -154,6 +163,10 @@ class panelObj{
docSwitch(){
}
closer(){
console.log('closer');
}
}
class poppedPanel{
@ -174,6 +187,8 @@ class poppedPanel{
//Functions
this.cPanel = cPanel;
this.keepAlive = false;
//Continue constructor asynchrnously
this.asyncConstructor();
}
@ -221,13 +236,19 @@ class poppedPanel{
}
closer(){
this.cPanel.poppedPanels.splice(this.cPanel.poppedPanels.indexOf(this),1);
if(!this.keepAlive){
this.panel.closer();
}
this.cPanel.poppedPanels.splice(this.cPanel.poppedPanels.indexOf(this),1);
}
unpop(){
//Set active panel
this.cPanel.setActivePanel(this.panel, this.panelDoc.innerHTML);
this.keepAlive = true;
//Close the popped window
this.window.close();
}
@ -235,6 +256,8 @@ class poppedPanel{
pin(){
this.cPanel.setPinnedPanel(this.panel, this.panelDoc.innerHTML);
this.keepAlive = true;
this.window.close();
}