|
|
@@ -226,7 +226,7 @@ class Timeline extends LitElement {
|
|
|
const tmp = this.rows.filter(r=>r.id===id)
|
|
|
return tmp.length > 0 ? tmp[0] : null;
|
|
|
}
|
|
|
- updateRessource<K extends keyof Ressource>(id:string,key:K,value:Ressource[K]):void{
|
|
|
+ updateRessource<K extends keyof Ressource>(id:string,key:K,value:Ressource[K]):Ressource|null{
|
|
|
const ressource = this.getRessourceFromId(id);
|
|
|
if(ressource){
|
|
|
if (key == "parent") {
|
|
|
@@ -239,7 +239,10 @@ class Timeline extends LitElement {
|
|
|
ressource[key] = value;
|
|
|
this.rows = this.rows.map(r=>r.id==ressource.id ? ressource : r);
|
|
|
}
|
|
|
+ this._updateEventPosition(ressource);
|
|
|
+ return ressource
|
|
|
}
|
|
|
+ return null
|
|
|
}
|
|
|
setRowsTitle(title: string):void {
|
|
|
this.rowsTitle = title;
|