diff --git a/src/client/widgets/containers/patchbay.js b/src/client/widgets/containers/patchbay.js
index cd7a29f2..841f54b1 100644
--- a/src/client/widgets/containers/patchbay.js
+++ b/src/client/widgets/containers/patchbay.js
@@ -1,14 +1,26 @@
var Widget = require('../common/widget'),
Canvas = require('../common/canvas'),
Container = require('../common/container'),
+ {iconify} = require('../../ui/utils'),
parser = require('../../parser'),
html = require('nanohtml')
class PatchBayNode extends Widget {
+
+ static defaults() {
+
+ return super.defaults({
+ label: {type: 'string', value: ''}
+ })
+
+ }
+
constructor(options) {
- super({...options, html: null})
+ super({...options, html: html``})
+
+ this.widget.innerHTML = iconify(this.getProp('label').replace(//g, '>').replace(/\n/g,'
'))
this.value = []
@@ -126,12 +138,12 @@ class PatchBay extends Container(Canvas) {
let w = parser.parse({
data: {
type: 'patchbaynode',
- label: k,
id: this.getProp('id') + '/' + this.inputs[k],
address: '@{parent.address}',
target: '@{parent.target}',
preArgs: this.inputs[k],
bypass: '@{parent.bypass}',
+ label: k
},
parentNode: DOM.get(this.widget, '.inputs')[0],
diff --git a/src/client/widgets/sliders/knob.js b/src/client/widgets/sliders/knob.js
index a1afde40..59f9c9ff 100644
--- a/src/client/widgets/sliders/knob.js
+++ b/src/client/widgets/sliders/knob.js
@@ -174,9 +174,10 @@ module.exports = class Knob extends Slider {
max = this.percentToAngle(100),
dashed = this.getProp('dashed'),
pips = this.getProp('pips'),
- minRadius = this.minDimension / 6,
- maxRadius = this.minDimension / 2 - (pips ? this.fontSize * 2 : PXSCALE),
- gaugeWidth = maxRadius - minRadius,
+ minRadius = this.minDimension / 6 - (pips ? this.fontSize * 0.75 : PXSCALE),
+ maxRadius = this.minDimension / 2 - (pips ? this.fontSize * 2 : PXSCALE)
+
+ var gaugeWidth = maxRadius - minRadius,
gaugeRadius = maxRadius - gaugeWidth / 2
this.clear()
@@ -217,12 +218,12 @@ module.exports = class Knob extends Slider {
this.ctx.globalAlpha = this.cssVars.alphaStroke
this.ctx.strokeStyle = this.cssVars.colorStroke
this.ctx.lineWidth = PXSCALE
-
- if (this.minDimension > 40) {
- this.ctx.beginPath()
- this.ctx.arc(this.width / 2, this.height / 2, minRadius, 0, 2 * Math.PI)
- this.ctx.stroke()
- }
+ //
+ // if (this.minDimension > 40) {
+ // this.ctx.beginPath()
+ // this.ctx.arc(this.width / 2, this.height / 2, minRadius, 0, 2 * Math.PI)
+ // this.ctx.stroke()
+ // }
this.ctx.beginPath()
@@ -312,7 +313,7 @@ module.exports = class Knob extends Slider {
for (var pip of this.rangeKeys) {
- let r1 = maxRadius,
+ let r1 = maxRadius + 2 * PXSCALE,
r2 = r1 + 4 * PXSCALE,
a = 2 * Math.PI - this.percentToAngle(pip)
@@ -324,7 +325,7 @@ module.exports = class Knob extends Slider {
}
- var radius = maxRadius + (this.fontSize + 2 * PXSCALE)
+ var radius = maxRadius + (this.fontSize + 4 * PXSCALE)
this.ctx.fillStyle = this.cssVars.colorText
this.ctx.globalAlpha = this.cssVars.alphaPipsText
for (var p in this.pipTexts) {
diff --git a/src/scss/widgets/containers.scss b/src/scss/widgets/containers.scss
index 9cfef6d6..c43fe783 100644
--- a/src/scss/widgets/containers.scss
+++ b/src/scss/widgets/containers.scss
@@ -543,6 +543,21 @@
}
}
+ label {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ white-space: pre;
+ line-height: 100%;
+ overflow: hidden;
+ text-align: center;
+ word-wrap: break-word;
+ height: 100%;
+ width: 100%;
+ border: 2rem solid transparent;
+ pointer-events: none;
+ }
+
}
@@ -583,6 +598,7 @@
}
&:after {
background: var(--color-key-on);
+ z-index: 1;
}
}
}
@@ -609,6 +625,7 @@
inner {
margin-left: 0!important;
margin-right: 0!important;
+ margin-bottom: 0!important;
background: var(--color-black-key);
}
}
diff --git a/src/scss/widgets/indicators.scss b/src/scss/widgets/indicators.scss
index 5da1a234..b45c15a6 100644
--- a/src/scss/widgets/indicators.scss
+++ b/src/scss/widgets/indicators.scss
@@ -1,7 +1,7 @@
.led-container {
- width: 90rem;
- height: 60rem;
+ width: 30rem;
+ height: 30rem;
--color-led: var(--color-fill);
--alpha-fill-off: 0;