Skip to content

Commit

Permalink
canvas flex
Browse files Browse the repository at this point in the history
  • Loading branch information
YuanhuanO committed Jun 4, 2024
1 parent 69cfb91 commit aaba6f8
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions daisen/static/src/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,11 @@ class Dashboard {
if (window.innerWidth > 768) {
dropdownCanvas.classList.remove('active');
dropdownCanvas.style.display = 'none';
this._toolBar.style.display = 'flex';
} else {
this._toolBar.style.display = 'none';
}
this._resize();
});

this._addZoomResetButton(this._toolBar);
Expand Down Expand Up @@ -440,12 +442,6 @@ class Dashboard {
this._pageBtnContainer.appendChild(paginationContainer);

this._addPageButtons(ul);
this._updatePageInfo(pageInfo);
}

_updatePageInfo(pageInfo: HTMLDivElement) {
const numPages = Math.ceil(this._filteredNames.length / (this._numRow * this._numCol));
pageInfo.innerHTML = `Page ${this._currPage} of ${numPages - 1}`;
}

_addPageButtons(ul: HTMLUListElement) {
Expand Down Expand Up @@ -570,7 +566,6 @@ class Dashboard {
this._addPaginationControl();
this._renderPage();
const pageInfo = this._pageBtnContainer.querySelector('.page-info') as HTMLDivElement;
this._updatePageInfo(pageInfo);
}

_renderPage() {
Expand Down

0 comments on commit aaba6f8

Please sign in to comment.