diff --git a/src/browser/js/app/widgets/common/_canvas_base.js b/src/browser/js/app/widgets/common/_canvas_base.js index 6f261a15..ef20060b 100644 --- a/src/browser/js/app/widgets/common/_canvas_base.js +++ b/src/browser/js/app/widgets/common/_canvas_base.js @@ -52,12 +52,13 @@ _canvas_base.prototype.resizeHandle = function(e, width, height, checkColors){ if (!this.visible || checkColors) { this.visible = true - this.colors.custom = getComputedStyle(this.widget[0]).getPropertyValue('--color-custom') - this.colors.text = getComputedStyle(this.widget[0]).getPropertyValue('--color-text') - this.colors.raised = getComputedStyle(this.widget[0]).getPropertyValue('--color-raised') - this.colors.bg = getComputedStyle(this.widget[0]).getPropertyValue('--color-bg') - this.colors.fg = getComputedStyle(this.widget[0]).getPropertyValue('--color-fg') - this.colors.faded = getComputedStyle(this.widget[0]).getPropertyValue('--color-faded') + var style = getComputedStyle(this.widget[0]) + this.colors.custom = style.getPropertyValue('--color-custom') + this.colors.text = style.getPropertyValue('--color-text') + this.colors.raised = style.getPropertyValue('--color-raised') + this.colors.bg = style.getPropertyValue('--color-bg') + this.colors.fg = style.getPropertyValue('--color-fg') + this.colors.faded = style.getPropertyValue('--color-faded') } requestAnimationFrame(this.draw.bind(this)) diff --git a/src/browser/js/app/widgets/pads/multixy.js b/src/browser/js/app/widgets/pads/multixy.js index 85456e49..64e85faa 100644 --- a/src/browser/js/app/widgets/pads/multixy.js +++ b/src/browser/js/app/widgets/pads/multixy.js @@ -122,7 +122,7 @@ MultiXy.prototype = Object.create(_pads_base.prototype) MultiXy.prototype.constructor = MultiXy MultiXy.prototype.resizeHandle = function(){ - _pads_base.prototype.resizeHandle.call(this) + _pads_base.prototype.resizeHandle.apply(this, arguments) this.updateHandlesPosition() } diff --git a/src/browser/js/app/widgets/sliders/_sliders_base.js b/src/browser/js/app/widgets/sliders/_sliders_base.js index 08d95acb..bc993779 100644 --- a/src/browser/js/app/widgets/sliders/_sliders_base.js +++ b/src/browser/js/app/widgets/sliders/_sliders_base.js @@ -119,9 +119,10 @@ _sliders_base.prototype.dragHandle = function(e, data, traversing) { _sliders_base.prototype.resizeHandle = function(e, width, height, checkColors) { if (!this.visible || checkColors) { - this.colors.track = getComputedStyle(this.widget[0]).getPropertyValue('--color-track') - this.colors.gauge = getComputedStyle(this.widget[0]).getPropertyValue('--color-gauge') - this.colors.knob = getComputedStyle(this.widget[0]).getPropertyValue('--color-knob') + var style = getComputedStyle(this.widget[0]) + this.colors.track = style.getPropertyValue('--color-track') + this.colors.gauge = style.getPropertyValue('--color-gauge') + this.colors.knob = style.getPropertyValue('--color-knob') } _canvas_base.prototype.resizeHandle.apply(this, arguments) }