Various fixes. Release version for reals
This commit is contained in:
parent
e2cb85610b
commit
79f5ae01de
@ -63,8 +63,8 @@ class CommsClient {
|
||||
|
||||
if (message.cmd === "set-ar") {
|
||||
this.pageInfo.setAr(message.ratio);
|
||||
} else if (message.cmd === 'set-video-float') {
|
||||
this.pageInfo.setVideoFloat(message.newFloat);
|
||||
} else if (message.cmd === 'set-alignment') {
|
||||
this.pageInfo.setVideoFloat(message.mode);
|
||||
this.pageInfo.restoreAr();
|
||||
} else if (message.cmd === "set-stretch") {
|
||||
this.pageInfo.setStretchMode(StretchMode[message.mode]);
|
||||
@ -276,7 +276,7 @@ class CommsServer {
|
||||
} else if (message.cmd === 'set-custom-ar') {
|
||||
this.settings.active.keyboard.shortcuts.q.arg = message.ratio;
|
||||
this.settings.save();
|
||||
} else if (message.cmd === 'set-video-float') {
|
||||
} else if (message.cmd === 'set-alignment') {
|
||||
this.sendToActive(message);
|
||||
} else if (message.cmd === 'autoar-start') {
|
||||
this.sendToActive(message);
|
||||
|
@ -123,6 +123,10 @@ class VideoData {
|
||||
this.resizer.setPanMode(mode);
|
||||
}
|
||||
|
||||
setVideoFloat(videoFloat) {
|
||||
this.resizer.setVideoFloat(videoFloat);
|
||||
}
|
||||
|
||||
restoreAr(){
|
||||
this.resizer.restore();
|
||||
}
|
||||
|
@ -476,13 +476,14 @@ class ArDetector {
|
||||
var newCanvasWidth = window.innerHeight * (this.video.videoWidth / this.video.videoHeight);
|
||||
var newCanvasHeight = window.innerHeight;
|
||||
|
||||
if(this.resizer.videFloat === "center")
|
||||
if (this.conf.resizer.videoFloat === "center") {
|
||||
this.canvasDrawWindowHOffset = Math.round((window.innerWidth - newCanvasWidth) * 0.5);
|
||||
else if(this.resizer.videFloat == "left")
|
||||
} else if (this.conf.resizer.videoFloat == "left") {
|
||||
this.canvasDrawWindowHOffset = 0;
|
||||
else
|
||||
} else {
|
||||
this.canvasDrawWindowHOffset = window.innerWidth - newCanvasWidth;
|
||||
|
||||
}
|
||||
|
||||
this.setup(newCanvasWidth, newCanvasHeight);
|
||||
|
||||
return;
|
||||
|
@ -235,6 +235,12 @@ class PageInfo {
|
||||
}
|
||||
}
|
||||
|
||||
setVideoFloat(videoFloat) {
|
||||
for(var vd of this.videos) {
|
||||
vd.setVideoFloat(videoFloat)
|
||||
}
|
||||
}
|
||||
|
||||
setPanMode(mode) {
|
||||
for(var vd of this.videos) {
|
||||
vd.setPanMode(mode);
|
||||
|
@ -180,6 +180,11 @@ class Resizer {
|
||||
this.restore();
|
||||
}
|
||||
|
||||
setVideoFloat(videoFloat) {
|
||||
this.videoFloat = videoFloat;
|
||||
this.restore();
|
||||
}
|
||||
|
||||
startCssWatcher(){
|
||||
if (this.destroyed) {
|
||||
return;
|
||||
|
@ -738,11 +738,11 @@ document.addEventListener("click", (e) => {
|
||||
if (e.target.classList.contains("_align")) {
|
||||
command.cmd = "set-alignment";
|
||||
|
||||
if (e.target.classList.contains("_align_left")) {
|
||||
if (e.target.classList.contains("_align_video_left")) {
|
||||
command.mode = 'left';
|
||||
} else if (e.target.classList.contains("_align_center")) {
|
||||
} else if (e.target.classList.contains("_align_video_center")) {
|
||||
command.mode = 'center';
|
||||
} else if (e.target.classList.contains("_align_right")) {
|
||||
} else if (e.target.classList.contains("_align_video_right")) {
|
||||
command.mode = 'right';
|
||||
}
|
||||
|
||||
@ -767,7 +767,7 @@ document.addEventListener("click", (e) => {
|
||||
VideoPanel.inputs.zoomSlider.value = 0; // log₂(1)
|
||||
command.cmd = 'set-zoom';
|
||||
command.zoom = 1;
|
||||
return;
|
||||
return command;
|
||||
}
|
||||
//#endregion
|
||||
//#region show/hide custom ar
|
||||
|
Loading…
Reference in New Issue
Block a user