diff --git a/bin/em/variabletime/web/js/layer.js b/bin/em/variabletime/web/js/layer.js index b9c2e5d..5df00d1 100644 --- a/bin/em/variabletime/web/js/layer.js +++ b/bin/em/variabletime/web/js/layer.js @@ -110,23 +110,23 @@ const Layer = function(tp, layerID, fontsAndAxes, autoInit = true) { variationAxes[axes[a].name] = tp.core.types.number(axes[a].defaultValue, { range: [axes[a].minValue, axes[a].maxValue], }); - if (typeof audio === 'object' && - typeof audio.getSavedMapping() === 'object' && - typeof audio.getSavedMapping()[this.id()] === 'object' && - typeof audio.getSavedMapping()[this.id()][`fontVariationAxes.${axes[a].name}`] === 'object' && - typeof audio.getMapping() === 'object' && - typeof audio.getMapping()[this.id()] === 'object' && - typeof audio.getMapping()[this.id()][`fontVariationAxes.${axes[a].name}`] === 'object' && - tp.getPanel() !== null) { - //doThese.push(() => { - //audio.removeAudioOptions(this, `fontVariationAxes.${axes[a].name}`); - //audio.removeAudioMapping(this, `fontVariationAxes.${axes[a].name}`); - //audio.getSavedMapping()[this.id()][`fontVariationAxes.${axes[a].name}`].min_out = axes[a].minValue; - //audio.getSavedMapping()[this.id()][`fontVariationAxes.${axes[a].name}`].max_out = axes[a].maxValue; - //audio.addAudioMapping(this, `fontVariationAxes.${axes[a].name}`); - //audio.addAudioOptions(this, `fontVariationAxes.${axes[a].name}`); - //}); - } + //if (typeof audio === 'object' && + //typeof audio.getSavedMapping() === 'object' && + //typeof audio.getSavedMapping()[this.id()] === 'object' && + //typeof audio.getSavedMapping()[this.id()][`fontVariationAxes.${axes[a].name}`] === 'object' && + //typeof audio.getMapping() === 'object' && + //typeof audio.getMapping()[this.id()] === 'object' && + //typeof audio.getMapping()[this.id()][`fontVariationAxes.${axes[a].name}`] === 'object' && + //tp.getPanel() !== null) { + ////doThese.push(() => { + ////audio.removeAudioOptions(this, `fontVariationAxes.${axes[a].name}`); + ////audio.removeAudioMapping(this, `fontVariationAxes.${axes[a].name}`); + ////audio.getSavedMapping()[this.id()][`fontVariationAxes.${axes[a].name}`].min_out = axes[a].minValue; + ////audio.getSavedMapping()[this.id()][`fontVariationAxes.${axes[a].name}`].max_out = axes[a].maxValue; + ////audio.addAudioMapping(this, `fontVariationAxes.${axes[a].name}`); + ////audio.addAudioOptions(this, `fontVariationAxes.${axes[a].name}`); + ////}); + //} } else { console.log('js::layer::selectFont', 'this axis is insane, abort', axes[a]); }