ui: multixy font

This commit is contained in:
jean-emmanuel 2017-07-12 20:32:59 +02:00
parent 02d21f6d3c
commit edd25d4cd6
3 changed files with 8 additions and 9 deletions

View file

@ -183,12 +183,9 @@ module.exports = class MultiXy extends _pads_base {
this.clear()
this.ctx.textAlign = 'center'
this.ctx.textBaseline = 'middle'
for (var i=0;i<this.npoints;i++) {
var x = clip(this.pads[i].faders.x.percent,[0,100]) / 100 * (this.width - (this.pointSize * 2 + 2) * PXSCALE) + (this.pointSize + 1) * PXSCALE,
y = (100 - clip(this.pads[i].faders.y.percent,[0,100])) / 100 * (this.height - (this.pointSize * 2 + 2) * PXSCALE) + (this.pointSize + 1) * PXSCALE,
var x = Math.round(clip(this.pads[i].faders.x.percent,[0,100]) / 100 * (this.width - (this.pointSize * 2 + 2) * PXSCALE) + (this.pointSize + 1) * PXSCALE),
y = Math.round((100 - clip(this.pads[i].faders.y.percent,[0,100])) / 100 * (this.height - (this.pointSize * 2 + 2) * PXSCALE) + (this.pointSize + 1) * PXSCALE),
t = this.labels ? this.getProp('points')[i] : i
this.ctx.strokeStyle = this.colors.custom
@ -207,11 +204,8 @@ module.exports = class MultiXy extends _pads_base {
this.ctx.globalAlpha = 1
this.ctx.fillStyle = this.colors.text
this.ctx.strokeStyle = this.colors.text
this.ctx.lineWidth = PXSCALE
this.ctx.font = PXSCALE * 11 + 'px Droid Sans'
this.ctx.fillText(t, x, y)
this.ctx.strokeText(t, x, y)
this.clearRect[i] = [x - this.pointSize * PXSCALE, y - this.pointSize * PXSCALE, this.pointSize * 2 * PXSCALE, this.pointSize * 2 * PXSCALE]

View file

@ -198,7 +198,7 @@ body {
.item-wrapper {
// margin-bottom:4rem;
label {
min-width:90rem;
min-width:98rem;
}
.input-wrapper {
position: relative;
@ -268,6 +268,7 @@ body {
text-transform: uppercase;
letter-spacing: 1rem;
font-size: 12rem;
line-height: 16rem;
}
#version {

View file

@ -128,6 +128,10 @@
.multixy-container {
> .pad {
--point-size:10rem;
text-align: center;
font-weight: 500;
font-size: 12rem;
> .wrapper {
padding: calc(var(--point-size) + 1rem);