This commit is contained in:
Tamius Han 2018-09-14 00:10:57 +02:00
parent a8a84fa4ef
commit d7946d4098
3 changed files with 23 additions and 4 deletions

View File

@ -171,13 +171,21 @@ var ExtensionConf = {
action: "pan",
arg: 'toggle' // possible: 'enable', 'disable', 'toggle'
},
"shift": {
"shiftKey_shift": {
action: "pan",
arg: 'toggle',
keyup: {
keyup: {
action: 'pan',
arg: 'toggle'
}
},
"shift": {
action: "",
arg: "",
keyup: {
action: 'pan',
arg: 'toggle',
}
}
//#endregion
},

View File

@ -106,6 +106,10 @@ class VideoData {
this.resizer.setAr(ar, lastAr);
}
resetAr() {
this.resizer.reset();
}
panHandler(event) {
this.resizer.panHandler(event);
}

View File

@ -220,9 +220,16 @@ class PageInfo {
if(ar !== 'auto') {
this.stopArDetection();
}
// TODO: find a way to only change aspect ratio for one video
for(var vd of this.videos){
vd.setAr(ar)
if (ar === 'reset') {
for (var vd of this.videos) {
vd.resetAr();
}
} else {
for (var vd of this.videos) {
vd.setAr(ar)
}
}
}