Wrap light and sound emitter changes in draft commit scheduling
This commit is contained in:
@@ -4296,7 +4296,7 @@ export function App({ store, initialStatusMessage }: AppProps) {
|
|||||||
onChange={(event) => {
|
onChange={(event) => {
|
||||||
const nextColorHex = event.currentTarget.value;
|
const nextColorHex = event.currentTarget.value;
|
||||||
setPointLightColorDraft(nextColorHex);
|
setPointLightColorDraft(nextColorHex);
|
||||||
applyPointLightChange({ colorHex: nextColorHex });
|
scheduleDraftCommit(() => applyPointLightChange({ colorHex: nextColorHex }));
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
@@ -4356,7 +4356,7 @@ export function App({ store, initialStatusMessage }: AppProps) {
|
|||||||
onChange={(event) => {
|
onChange={(event) => {
|
||||||
const nextColorHex = event.currentTarget.value;
|
const nextColorHex = event.currentTarget.value;
|
||||||
setSpotLightColorDraft(nextColorHex);
|
setSpotLightColorDraft(nextColorHex);
|
||||||
applySpotLightChange({ colorHex: nextColorHex });
|
scheduleDraftCommit(() => applySpotLightChange({ colorHex: nextColorHex }));
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
@@ -4528,7 +4528,11 @@ export function App({ store, initialStatusMessage }: AppProps) {
|
|||||||
onChange={(event) => {
|
onChange={(event) => {
|
||||||
const nextAudioAssetId = event.currentTarget.value.trim();
|
const nextAudioAssetId = event.currentTarget.value.trim();
|
||||||
setSoundEmitterAudioAssetIdDraft(nextAudioAssetId);
|
setSoundEmitterAudioAssetIdDraft(nextAudioAssetId);
|
||||||
applySoundEmitterChange({ audioAssetId: nextAudioAssetId.length === 0 ? null : nextAudioAssetId });
|
scheduleDraftCommit(() =>
|
||||||
|
applySoundEmitterChange({
|
||||||
|
audioAssetId: nextAudioAssetId.length === 0 ? null : nextAudioAssetId
|
||||||
|
})
|
||||||
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<option value="">— none —</option>
|
<option value="">— none —</option>
|
||||||
@@ -4611,7 +4615,7 @@ export function App({ store, initialStatusMessage }: AppProps) {
|
|||||||
onChange={(event) => {
|
onChange={(event) => {
|
||||||
const nextAutoplay = event.currentTarget.checked;
|
const nextAutoplay = event.currentTarget.checked;
|
||||||
setSoundEmitterAutoplayDraft(nextAutoplay);
|
setSoundEmitterAutoplayDraft(nextAutoplay);
|
||||||
applySoundEmitterChange({ autoplay: nextAutoplay });
|
scheduleDraftCommit(() => applySoundEmitterChange({ autoplay: nextAutoplay }));
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
@@ -4624,7 +4628,7 @@ export function App({ store, initialStatusMessage }: AppProps) {
|
|||||||
onChange={(event) => {
|
onChange={(event) => {
|
||||||
const nextLoop = event.currentTarget.checked;
|
const nextLoop = event.currentTarget.checked;
|
||||||
setSoundEmitterLoopDraft(nextLoop);
|
setSoundEmitterLoopDraft(nextLoop);
|
||||||
applySoundEmitterChange({ loop: nextLoop });
|
scheduleDraftCommit(() => applySoundEmitterChange({ loop: nextLoop }));
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
@@ -4760,7 +4764,7 @@ export function App({ store, initialStatusMessage }: AppProps) {
|
|||||||
onChange={(event) => {
|
onChange={(event) => {
|
||||||
const nextEnabled = event.currentTarget.checked;
|
const nextEnabled = event.currentTarget.checked;
|
||||||
setInteractableEnabledDraft(nextEnabled);
|
setInteractableEnabledDraft(nextEnabled);
|
||||||
applyInteractableChange({ enabled: nextEnabled });
|
scheduleDraftCommit(() => applyInteractableChange({ enabled: nextEnabled }));
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
|
|||||||
Reference in New Issue
Block a user