fix remove color mapping & options
This commit is contained in:
parent
667447b9a2
commit
bb76bd09c6
1 changed files with 11 additions and 2 deletions
|
@ -51,6 +51,14 @@ const Audio = function(tp, record) {
|
|||
return false;
|
||||
}
|
||||
if (!mapping[layer.id()].hasOwnProperty(propTitle)) {
|
||||
if (propTitle === 'color' &&
|
||||
config.audio.colorSeparateRGBA &&
|
||||
mapping[layer.id()].hasOwnProperty('color.r') &&
|
||||
mapping[layer.id()].hasOwnProperty('color.g') &&
|
||||
mapping[layer.id()].hasOwnProperty('color.b') &&
|
||||
mapping[layer.id()].hasOwnProperty('color.a')) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
@ -121,7 +129,7 @@ const Audio = function(tp, record) {
|
|||
if (!mapping[layer.id()].hasOwnProperty(propTitle)) {
|
||||
// no propTitle
|
||||
// perhaps color?
|
||||
if (config.audio.separateRGBA && propTitle === 'color') {
|
||||
if (config.audio.colorSeparateRGBA && propTitle === 'color') {
|
||||
let isGood = true;
|
||||
isGood = removeAudioMapping(layer, 'color.r');
|
||||
isGood = removeAudioMapping(layer, 'color.g');
|
||||
|
@ -148,6 +156,7 @@ const Audio = function(tp, record) {
|
|||
audioOptions.style.position = 'relative';
|
||||
audioOptions.style.width = '100%';
|
||||
if (propTitle.split('.')[0] === 'color' && propTitle.split('.').length > 1) {
|
||||
audioOptions.classList.add(toCssClass('audioOptionscolor'));
|
||||
switch(propTitle.split('.')[1]) {
|
||||
case 'r': {
|
||||
audioOptions.style.background = 'rgba(255,0,0,0.2)';
|
||||
|
@ -513,7 +522,7 @@ const Audio = function(tp, record) {
|
|||
convolver.buffer = buffer;
|
||||
},
|
||||
function(e) {
|
||||
console.log("Error with decoding audio data" + e.err);
|
||||
console.log("Audio::audioCtx.decodeAudioData", "Error with decoding audio data" + e.err);
|
||||
}
|
||||
);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue