Fix scrolling caption
This commit is contained in:
parent
67786ef2cc
commit
ebe21e0fd4
@ -338,6 +338,7 @@ class AppMediaViewerBase<ContentAdditionType extends string, ButtonsAdditionType
|
|||||||
this.zoomElements.container.classList.toggle('is-visible', enable);
|
this.zoomElements.container.classList.toggle('is-visible', enable);
|
||||||
const zoomValue = enable ? this.zoomElements.rangeSelector.value : 1;
|
const zoomValue = enable ? this.zoomElements.rangeSelector.value : 1;
|
||||||
this.setZoomValue(zoomValue);
|
this.setZoomValue(zoomValue);
|
||||||
|
this.zoomElements.rangeSelector.setProgress(zoomValue);
|
||||||
|
|
||||||
if(this.videoPlayer) {
|
if(this.videoPlayer) {
|
||||||
this.videoPlayer.lockControls(enable ? false : undefined);
|
this.videoPlayer.lockControls(enable ? false : undefined);
|
||||||
@ -497,7 +498,7 @@ class AppMediaViewerBase<ContentAdditionType extends string, ButtonsAdditionType
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// let good = true;
|
let good = true;
|
||||||
if(e.key === 'ArrowRight') {
|
if(e.key === 'ArrowRight') {
|
||||||
this.buttons.next.click();
|
this.buttons.next.click();
|
||||||
} else if(e.key === 'ArrowLeft') {
|
} else if(e.key === 'ArrowLeft') {
|
||||||
@ -506,17 +507,17 @@ class AppMediaViewerBase<ContentAdditionType extends string, ButtonsAdditionType
|
|||||||
if(this.ctrlKeyDown) {
|
if(this.ctrlKeyDown) {
|
||||||
this.changeZoom(e.key === '=');
|
this.changeZoom(e.key === '=');
|
||||||
}
|
}
|
||||||
}/* else {
|
} else {
|
||||||
good = false;
|
good = false;
|
||||||
} */
|
}
|
||||||
|
|
||||||
if(e.ctrlKey || e.metaKey) {
|
if(e.ctrlKey || e.metaKey) {
|
||||||
this.ctrlKeyDown = true;
|
this.ctrlKeyDown = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// if(good) {
|
if(good) {
|
||||||
cancelEvent(e);
|
cancelEvent(e);
|
||||||
// }
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
private onKeyUp = (e: KeyboardEvent) => {
|
private onKeyUp = (e: KeyboardEvent) => {
|
||||||
@ -534,7 +535,7 @@ class AppMediaViewerBase<ContentAdditionType extends string, ButtonsAdditionType
|
|||||||
};
|
};
|
||||||
|
|
||||||
private onWheel = (e: WheelEvent) => {
|
private onWheel = (e: WheelEvent) => {
|
||||||
if(rootScope.overlaysActive > 1) {
|
if(rootScope.overlaysActive > 1 || (findUpClassName(e.target, 'media-viewer-caption') && !this.ctrlKeyDown)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user