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", action: "pan",
arg: 'toggle' // possible: 'enable', 'disable', 'toggle' arg: 'toggle' // possible: 'enable', 'disable', 'toggle'
}, },
"shift": { "shiftKey_shift": {
action: "pan", action: "pan",
arg: 'toggle', arg: 'toggle',
keyup: { keyup: {
action: 'pan', action: 'pan',
arg: 'toggle' arg: 'toggle'
} }
},
"shift": {
action: "",
arg: "",
keyup: {
action: 'pan',
arg: 'toggle',
}
} }
//#endregion //#endregion
}, },

View File

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

View File

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