Skip to content

Commit

Permalink
Improve the smoothness of message box display
Browse files Browse the repository at this point in the history
  • Loading branch information
hbl917070 committed Oct 23, 2024
1 parent a2d6bb2 commit 5be1d59
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
2 changes: 0 additions & 2 deletions Www/scss/MainWindow/_MainExif.scss
Original file line number Diff line number Diff line change
Expand Up @@ -510,12 +510,10 @@
top: 35px;
transform: translateX(420px);
transition: all 0.1s;
opacity: 0;
pointer-events: none;

&[active="true"] {
transform: translateX(0px);
opacity: 1;
pointer-events: initial;
}

Expand Down
10 changes: 4 additions & 6 deletions Www/scss/_Msgbox.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,12 @@
@include blur-base();

// 顯示時的動畫
transition: all 0.1s;
transition-timing-function: cubic-bezier(0.6, 0.3, 0.33, 1.67);
opacity: 0.8;
transform: scaleY(1.05) translateY(0px);
transition: transform 0.1s;
// transition-timing-function: cubic-bezier(0.6, 0.3, 0.33, 1.67);
transform: translateY(-5px);
}
.msgbox-box[active="true"] {
opacity: 1;
transform: scaleY(1) translateY(0px);
transform: translateY(0);
}

.msgbox-txt {
Expand Down
6 changes: 4 additions & 2 deletions Www/ts/MainWindow/TextEditor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,11 @@ export class TextEditor {

_isShow = true;
_dom.style.display = "";
await Lib.sleep(1);
_dom.setAttribute("active", "true");

setTimeout(() => {
_dom.setAttribute("active", "true");
}, 10);

if (path === null) { path = "" }
_filePath = path;
let t = "";
Expand Down
2 changes: 1 addition & 1 deletion Www/ts/Msgbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ export class Msgbox {

setTimeout(() => {
donBox.setAttribute("active", "true");
}, 1);
}, 10);

if (json.funcYes === undefined) { // 如果沒有指定按下「確定」的事件,就隱藏「取消」按鈕
donBtnNo.style.display = "none";
Expand Down

0 comments on commit 5be1d59

Please sign in to comment.