|
@@ -872,23 +872,25 @@ export const refreshView = () => {
|
|
|
const top = Math.max(parseFloat((cursorEl || state.osmd.cursor.cursorElement).style.top), 0)
|
|
|
if (Math.abs(prevDiff - top) > 10 && !viewing) {
|
|
|
viewing = true
|
|
|
- setTimeout(() => {
|
|
|
- viewing = false
|
|
|
- const scrollElement = containerEl ? containerEl :
|
|
|
+ const scrollElement = containerEl ? containerEl :
|
|
|
appState.clintNmae === 'colexiu'
|
|
|
? state.osmd.container.parentElement.parentElement
|
|
|
: state.osmd.container.parentElement;
|
|
|
- if (detailState.chenkuang) {
|
|
|
- scrollElement.scrollTop = top
|
|
|
- } else {
|
|
|
+ if (detailState.chenkuang) {
|
|
|
+ scrollElement.scrollTop = top
|
|
|
+ viewing = false
|
|
|
+ } else {
|
|
|
+ setTimeout(() => {
|
|
|
+ viewing = false
|
|
|
scrollElement.scrollTo({
|
|
|
top: top,
|
|
|
left: 0,
|
|
|
behavior: 'smooth',
|
|
|
})
|
|
|
- }
|
|
|
- prevDiff = top
|
|
|
- }, 100)
|
|
|
+ prevDiff = top
|
|
|
+ }, 100)
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
const updatePlayTime = async (time: number) => {
|