lint: spaces
This commit is contained in:
parent
939141a2ce
commit
8093945a64
12 changed files with 69 additions and 69 deletions
|
|
@ -7,8 +7,8 @@ var Widget = require('../common/widget'),
|
|||
var sanitizeOptions = {
|
||||
allowedTags: sanitizeHtml.defaults.allowedTags.concat(['img', 'h1', 'h2']).filter(x=>x!=='iframe'),
|
||||
allowedAttributes: {
|
||||
'*': [ 'title', 'class', 'style'],
|
||||
'img': [ 'src' , 'title', 'class', 'style', 'width', 'height']
|
||||
'*': [ 'title', 'class', 'style'],
|
||||
'img': [ 'src' , 'title', 'class', 'style', 'width', 'height']
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ class Eq extends StaticProperties(Plot, {logScaleX: false, logScaleY:false}) {
|
|||
} catch(e) {
|
||||
this.filters[i] = new BiquadFilterNode(audioContext, {
|
||||
Q: 1,
|
||||
type: "allpass",
|
||||
type: 'allpass',
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -101,9 +101,9 @@ class Eq extends StaticProperties(Plot, {logScaleX: false, logScaleY:false}) {
|
|||
|
||||
if (filter._on === false) continue
|
||||
|
||||
var filterResponse = new Float32Array(resolution);
|
||||
var filterResponse = new Float32Array(resolution)
|
||||
|
||||
filter.getFrequencyResponse(frequencyHz, filterResponse, phaseResponse);
|
||||
filter.getFrequencyResponse(frequencyHz, filterResponse, phaseResponse)
|
||||
|
||||
responses.push(filterResponse)
|
||||
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ module.exports = class Xy extends Pad {
|
|||
for (let i in this.faders.x.rangeKeys) {
|
||||
|
||||
let pip = this.faders.x.rangeKeys[i],
|
||||
px = Math.round(0.5 * this.faders.x.percentToCoord(pip)) * 2
|
||||
px = Math.round(0.5 * this.faders.x.percentToCoord(pip)) * 2
|
||||
|
||||
if (parseInt(px) === px) px -= 0.5
|
||||
|
||||
|
|
@ -238,7 +238,7 @@ module.exports = class Xy extends Pad {
|
|||
for (let i in this.faders.y.rangeKeys) {
|
||||
|
||||
let pip = this.faders.y.rangeKeys[i],
|
||||
py = Math.round(0.5 * this.faders.y.percentToCoord(pip)) * 2
|
||||
py = Math.round(0.5 * this.faders.y.percentToCoord(pip)) * 2
|
||||
|
||||
if (parseInt(py) === py) py -= 0.5
|
||||
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ class ScriptVm extends Vm {
|
|||
if (filter) {
|
||||
|
||||
var filter = Array.isArray(filter) ? filter : [filter],
|
||||
containers = this.filter.map(x=>widgetManager.getWidgetById(x)).reduce((a,b)=>a.concat(b), [])
|
||||
containers = this.filter.map(x=>widgetManager.getWidgetById(x)).reduce((a,b)=>a.concat(b), [])
|
||||
if (!containers.length) return
|
||||
filter = (widget)=>{
|
||||
return containers.some(x=>x.contains(widget) || x === widget)
|
||||
|
|
@ -242,7 +242,7 @@ class ScriptVm extends Vm {
|
|||
}
|
||||
|
||||
for (var imports of ['set', 'get', 'getProp', 'send', 'httpGet', 'stateGet', 'stateSet', 'storage',
|
||||
'setInterval', 'clearInterval', 'setTimeout', 'clearTimeout']) {
|
||||
'setInterval', 'clearInterval', 'setTimeout', 'clearTimeout']) {
|
||||
this.sanitize(this.sandbox.contentWindow[imports])
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@ module.exports = class Fader extends Slider {
|
|||
|
||||
if (this.getProp('pips') && !compact) {
|
||||
this.ctx.globalAlpha = 1
|
||||
this.ctx.drawImage(this.pips, 0, 0);
|
||||
this.ctx.drawImage(this.pips, 0, 0)
|
||||
if (!compact) this.clearRect = [this.clearRect, [m + 10 * PXSCALE, 0, 10 * PXSCALE + this.pipsTextSize, height]]
|
||||
}
|
||||
|
||||
|
|
@ -394,7 +394,7 @@ module.exports = class Fader extends Slider {
|
|||
ctx.save()
|
||||
ctx.translate(textX + 3 * PXSCALE, textY - 0.5 * PXSCALE)
|
||||
ctx.rotate(Math.PI/2)
|
||||
ctx.textAlign = "center"
|
||||
ctx.textAlign = 'center'
|
||||
ctx.fillText(this.rangeLabels[i], 0, 0)
|
||||
ctx.restore()
|
||||
|
||||
|
|
|
|||
|
|
@ -367,7 +367,7 @@ class Range extends Fader {
|
|||
|
||||
if (this.getProp('pips')) {
|
||||
this.ctx.globalAlpha = 1
|
||||
this.ctx.drawImage(this.pips, 0, 0);
|
||||
this.ctx.drawImage(this.pips, 0, 0)
|
||||
if (!compact) this.clearRect = [this.clearRect, [m + 10 * PXSCALE, 0, 10 * PXSCALE + this.pipsTextSize, height]]
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue