[frontend] fix pattern hidden seek
Fixes an issue where seek then unhide the pattern would keep the old display.
This commit is contained in:
parent
e8a09e884b
commit
49c843feb6
1 changed files with 8 additions and 15 deletions
|
|
@ -266,16 +266,12 @@ function initSeek() {
|
||||||
isSeeking = true;
|
isSeeking = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function performSeek() {
|
function performSeek(forceUpate = false) {
|
||||||
const noNode = !player.value.currentPlayingNode;
|
const noNode = !player.value.currentPlayingNode;
|
||||||
if (noNode) {
|
if (noNode) player.value.play(buffer);
|
||||||
player.value.play(buffer);
|
|
||||||
}
|
|
||||||
player.value.seek(position.value);
|
player.value.seek(position.value);
|
||||||
display(true);
|
if (!patternHide.value || forceUpate) display(true);
|
||||||
if (noNode) {
|
if (noNode) player.value.stop();
|
||||||
player.value.stop();
|
|
||||||
}
|
|
||||||
isSeeking = false;
|
isSeeking = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -298,14 +294,11 @@ function togglePattern() {
|
||||||
|
|
||||||
if (player.value.getRow() === 0 && player.value.getPattern() === 0) {
|
if (player.value.getRow() === 0 && player.value.getPattern() === 0) {
|
||||||
try {
|
try {
|
||||||
player.value.play(buffer);
|
performSeek(true);
|
||||||
display(true);
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.warn(err);
|
console.warn(err);
|
||||||
}
|
}
|
||||||
player.value.stop();
|
player.value.stop();
|
||||||
} else {
|
|
||||||
display(true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -515,7 +508,7 @@ function display(skipOptimizationChecks = false) {
|
||||||
|
|
||||||
if (firstFrame) {
|
if (firstFrame) {
|
||||||
// Changing it to false should enable pattern display by default.
|
// Changing it to false should enable pattern display by default.
|
||||||
patternHide.value = false;
|
patternHide.value = true;
|
||||||
handleScrollBarEnable();
|
handleScrollBarEnable();
|
||||||
firstFrame = false;
|
firstFrame = false;
|
||||||
}
|
}
|
||||||
|
|
@ -639,7 +632,7 @@ onDeactivated(() => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.patternShadowTop {
|
.patternShadowTop {
|
||||||
background: #00000000;
|
background: #00000080;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc( 50% - 14px );
|
height: calc( 50% - 14px );
|
||||||
translate: -50% -100%;
|
translate: -50% -100%;
|
||||||
|
|
@ -650,7 +643,7 @@ onDeactivated(() => {
|
||||||
}
|
}
|
||||||
|
|
||||||
.patternShadowBottom {
|
.patternShadowBottom {
|
||||||
background: #00000000;
|
background: #00000080;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: calc( 50% - 12px );
|
height: calc( 50% - 12px );
|
||||||
translate: -50% 0;
|
translate: -50% 0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue