dispatch sequenceEvents
This commit is contained in:
parent
a65c275162
commit
4b94d449ad
2 changed files with 36 additions and 0 deletions
|
@ -62,6 +62,19 @@ const BasicKeyframedTrack: React.VFC<BasicKeyframedTracksProps> = React.memo(
|
||||||
props,
|
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 snapPositionsState = useVal(snapPositionsStateD)
|
||||||
|
|
||||||
const snapPositions =
|
const snapPositions =
|
||||||
|
|
|
@ -702,6 +702,17 @@ namespace stateEditors {
|
||||||
|
|
||||||
tracks.trackData[trackId] = track
|
tracks.trackData[trackId] = track
|
||||||
tracks.trackIdByPropPath[pathEncoded] = trackId
|
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(
|
export function setPrimitivePropAsStatic(
|
||||||
|
@ -721,6 +732,18 @@ namespace stateEditors {
|
||||||
stateEditors.coreByProject.historic.sheetsById.staticOverrides.byObject.setValueOfPrimitiveProp(
|
stateEditors.coreByProject.historic.sheetsById.staticOverrides.byObject.setValueOfPrimitiveProp(
|
||||||
p,
|
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(
|
export function setCompoundPropAsStatic(
|
||||||
|
|
Loading…
Reference in a new issue