dispatch sequenceEvents

This commit is contained in:
jrkb 2023-05-14 10:20:30 +02:00
parent a65c275162
commit 4b94d449ad
2 changed files with 36 additions and 0 deletions

View file

@ -62,6 +62,19 @@ const BasicKeyframedTrack: React.VFC<BasicKeyframedTracksProps> = React.memo(
props,
)
const toVT = {
sequenced: true,
panelID: leaf.sheetObject.address.objectKey,
prop: leaf.pathToProp,
origin: 'BasicKeyframedTrack.tsx',
}
const event = new CustomEvent('sequenceEvent', {
bubbles: false,
detail: toVT,
})
window.dispatchEvent(event)
//console.log('sequence this', {toVT});
const snapPositionsState = useVal(snapPositionsStateD)
const snapPositions =

View file

@ -702,6 +702,17 @@ namespace stateEditors {
tracks.trackData[trackId] = track
tracks.trackIdByPropPath[pathEncoded] = trackId
const toVT = {
sequenced: true,
panelID: p.objectKey,
prop: p.pathToProp,
origin: 'stateEditors.ts',
}
const event = new CustomEvent('sequenceEvent', {
bubbles: false,
detail: toVT,
})
window.dispatchEvent(event)
}
export function setPrimitivePropAsStatic(
@ -721,6 +732,18 @@ namespace stateEditors {
stateEditors.coreByProject.historic.sheetsById.staticOverrides.byObject.setValueOfPrimitiveProp(
p,
)
const toVT = {
sequenced: false,
panelID: p.objectKey,
prop: p.pathToProp,
origin: 'stateEditors.ts',
}
const event = new CustomEvent('sequenceEvent', {
bubbles: false,
detail: toVT,
})
window.dispatchEvent(event)
//console.log('make this static', {toVT});
}
export function setCompoundPropAsStatic(