use liveUpdater in audio
This commit is contained in:
parent
f8984174e0
commit
1ef64e4eba
2 changed files with 2 additions and 18 deletions
|
@ -612,23 +612,6 @@ const Audio = function(tp, record) {
|
|||
// this is when to monitor live
|
||||
if (!record.isRecording()) {
|
||||
if (!tp.core.val(tp.sheet.sequence.pointer.playing)) {
|
||||
if (typeof window.immediateUpdate !== 'function') {
|
||||
window.immediateUpdate = (layer, values) => {
|
||||
const v = {
|
||||
...layer.theatreObject.value,
|
||||
...values
|
||||
};
|
||||
const p = layer.values2cppProps(v);
|
||||
if (p !== false) {
|
||||
const id = layer.id();
|
||||
if (id !== 'artboard') {
|
||||
Module.setProps(p, layer.id());
|
||||
} else {
|
||||
Module.setArtboardProps(p, layer.id());
|
||||
}
|
||||
}
|
||||
};
|
||||
}
|
||||
let values = {};
|
||||
propsToSet.forEach((p) => {
|
||||
const newValues = {
|
||||
|
@ -643,7 +626,7 @@ const Audio = function(tp, record) {
|
|||
};
|
||||
});
|
||||
Object.keys(values).forEach((layerID) => {
|
||||
immediateUpdate(getLayer(layerID), values[layerID]);
|
||||
record.liveUpdater.immediateUpdate(getLayer(layerID), values[layerID]);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -396,6 +396,7 @@ const Record = function(tp) {
|
|||
};
|
||||
|
||||
// public
|
||||
this.liveUpdater = liveUpdater;
|
||||
this.addRecordButton = addRecordButton;
|
||||
this.addHot = addHot;
|
||||
this.removeHot = removeHot;
|
||||
|
|
Loading…
Reference in a new issue