diff --git a/bin/web/js/audio.js b/bin/web/js/audio.js index 8e3eef8..088b899 100644 --- a/bin/web/js/audio.js +++ b/bin/web/js/audio.js @@ -629,10 +629,21 @@ const Audio = function(tp, record) { } }; } + let values = {}; propsToSet.forEach((p) => { - immediateUpdate(p.layer, { + const newValues = { [p.title]: p.value - }); + }; + if (!values.hasOwnProperty(p.id)) { + values[p.id] = {}; + } + values[p.id] = { + ...values[p.id], + ...newValues, + }; + }); + Object.keys(values).forEach((layerID) => { + immediateUpdate(getLayer(layerID), values[layerID]); }); } } else { diff --git a/bin/web/js/record.js b/bin/web/js/record.js index 0d7a1bc..1a654d5 100644 --- a/bin/web/js/record.js +++ b/bin/web/js/record.js @@ -304,6 +304,7 @@ const Record = function(tp) { }; const startRecording = () => { + console.log('Record::startRecording'); tp.sheet.sequence.pause(); const layerKeys = Object.keys(hot); layerKeys.forEach((layerID) => { @@ -327,7 +328,8 @@ const Record = function(tp) { [propTitle]: value, }; buffy.addValues(layerID, recording, position, lastPosition); - liveUpdater.immediateUpdate(layer, recording); + const merged = buffy.getValues(layerID, position); + liveUpdater.immediateUpdate(layer, merged); lastPosition = position; }); } else {