Skip to content

Commit 3f45f17

Browse files
Merge pull request #61 from RBTech-dev/develop
Develop
2 parents 51f693d + f8acb71 commit 3f45f17

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

packages/angular-winbox/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ constructor(winBoxService : WinboxService) {}
3434
// Open the last created WinBox.
3535
this.winBoxService.showLastWinbox();
3636

37+
// Maximize a WinBox by id.
38+
this.winBoxService.maximizeWinbox(id: string | number);
39+
40+
// Minimize a WinBox by id.
41+
this.winBoxService.minimizeWinbox(id: string | number);
42+
3743
// Close all the created winBox.
3844
this.winBoxService.closeAllWinBoxes();
3945

packages/angular-winbox/src/lib/winbox.service.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,14 @@ export class WinboxService {
8585
if (this.winBoxStack.length > 0)
8686
this.winBoxStack[this.winBoxStack.length - 1].show();
8787
}
88+
89+
/** This method minimize a Winbox selected by id*/
90+
public minimizeWinbox(id: string | number) {
91+
this.winBoxStack.find((winbox) => winbox.id === id)?.minimize(false);
92+
}
93+
94+
/** This method maximize a Winbox selected by id*/
95+
public maximizeWinbox(id: string | number) {
96+
this.winBoxStack.find((winbox) => winbox.id === id)?.maximize(false);
97+
}
8898
}

0 commit comments

Comments
 (0)