on scene selection OK + keyframe model
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
class KeyframesModel extends WindozModel {
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
this.ressource = '/keyframes'
|
||||
}
|
||||
|
||||
async save(data) {
|
||||
const kfData = Object.keys(data).map(aid => {
|
||||
const { position, speed, ...storeValues} = data[aid].values
|
||||
return({
|
||||
aid: aid,
|
||||
storeValues: storeValues,
|
||||
gpsValues: { position: data[aid].values.position, speed: data[aid].values.speed }
|
||||
})
|
||||
})
|
||||
|
||||
let endpoint = {...app.config.api[this.ressource].getTypes}
|
||||
endpoint.uri = endpoint.uri.replace('{family}', data.kfId || '')
|
||||
const aid = Object.keys(x)[data]
|
||||
return (
|
||||
this.request(endpoint.uri, endpoint.method, kfData)
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
app.registerClass('KeyframesModel', KeyframesModel);
|
||||
Reference in New Issue
Block a user