Fix passing logger some more
This commit is contained in:
parent
c08033fba6
commit
7ac5e17415
@ -4,13 +4,13 @@ import ExtensionMode from '../../common/enums/extension-mode.enum';
|
|||||||
|
|
||||||
class ActionHandler {
|
class ActionHandler {
|
||||||
|
|
||||||
constructor(pageInfo, logger) {
|
constructor(pageInfo) {
|
||||||
this.pageInfo = pageInfo;
|
this.pageInfo = pageInfo;
|
||||||
this.settings = pageInfo.settings;
|
this.settings = pageInfo.settings;
|
||||||
|
|
||||||
this.inputs = ['input', 'select', 'button', 'textarea'];
|
this.inputs = ['input', 'select', 'button', 'textarea'];
|
||||||
this.keyboardLocalDisabled = false;
|
this.keyboardLocalDisabled = false;
|
||||||
this.logger = logger;
|
this.logger = pageInfo.logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
init() {
|
init() {
|
||||||
|
@ -22,9 +22,9 @@ class Resizer {
|
|||||||
|
|
||||||
this.logger = videoData.logger;
|
this.logger = videoData.logger;
|
||||||
|
|
||||||
this.scaler = new Scaler(this.conf, logger);
|
this.scaler = new Scaler(this.conf);
|
||||||
this.stretcher = new Stretcher(this.conf, logger);
|
this.stretcher = new Stretcher(this.conf);
|
||||||
this.zoom = new Zoom(this.conf, logger);
|
this.zoom = new Zoom(this.conf);
|
||||||
|
|
||||||
// load up default values
|
// load up default values
|
||||||
this.correctedVideoDimensions = {};
|
this.correctedVideoDimensions = {};
|
||||||
|
@ -9,9 +9,9 @@ class Scaler {
|
|||||||
// internal variables
|
// internal variables
|
||||||
|
|
||||||
// functions
|
// functions
|
||||||
constructor(videoData, logger) {
|
constructor(videoData) {
|
||||||
this.conf = videoData;
|
this.conf = videoData;
|
||||||
this.logger = logger;
|
this.logger = videoData.logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,11 +10,11 @@ class Stretcher {
|
|||||||
|
|
||||||
|
|
||||||
// functions
|
// functions
|
||||||
constructor(videoData, logger) {
|
constructor(videoData) {
|
||||||
this.conf = videoData;
|
this.conf = videoData;
|
||||||
this.settings = videoData.settings;
|
this.settings = videoData.settings;
|
||||||
this.mode = this.settings.getDefaultStretchMode(window.location.hostname);
|
this.mode = this.settings.getDefaultStretchMode(window.location.hostname);
|
||||||
this.logger = logger;
|
this.logger = videoData.logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
setStretchMode(stretchMode) {
|
setStretchMode(stretchMode) {
|
||||||
|
@ -5,14 +5,14 @@ import Debug from '../../conf/Debug';
|
|||||||
|
|
||||||
class Zoom {
|
class Zoom {
|
||||||
// functions
|
// functions
|
||||||
constructor(videoData, logger) {
|
constructor(videoData) {
|
||||||
this.scale = 1;
|
this.scale = 1;
|
||||||
this.logScale = 0;
|
this.logScale = 0;
|
||||||
this.scaleStep = 0.1;
|
this.scaleStep = 0.1;
|
||||||
this.minScale = -1; // 50% (log2(0.5) = -1)
|
this.minScale = -1; // 50% (log2(0.5) = -1)
|
||||||
this.maxScale = 3; // 800% (log2(8) = 3)
|
this.maxScale = 3; // 800% (log2(8) = 3)
|
||||||
this.conf = videoData;
|
this.conf = videoData;
|
||||||
this.logger = logger;
|
this.logger = videoData.logger;
|
||||||
}
|
}
|
||||||
|
|
||||||
reset(){
|
reset(){
|
||||||
|
@ -119,7 +119,7 @@ class UW {
|
|||||||
|
|
||||||
// start action handler only if extension is enabled for this site
|
// start action handler only if extension is enabled for this site
|
||||||
if (!isSiteDisabled) {
|
if (!isSiteDisabled) {
|
||||||
this.actionHandler = new ActionHandler(this.pageInfo, this.logger);
|
this.actionHandler = new ActionHandler(this.pageInfo);
|
||||||
this.actionHandler.init();
|
this.actionHandler.init();
|
||||||
|
|
||||||
this.logger.log('info', 'debug', "[uw.js::setup] ActionHandler initiated:", this.actionHandler);
|
this.logger.log('info', 'debug', "[uw.js::setup] ActionHandler initiated:", this.actionHandler);
|
||||||
|
Loading…
Reference in New Issue
Block a user