|
|
@@ -182,7 +182,6 @@ class Timeline extends LitElement {
|
|
|
* @param ressource
|
|
|
* @returns The Ressource object registered to in the timeline
|
|
|
*/
|
|
|
- //TODO add posibbility to add resource at a given rows
|
|
|
addRessource(ressource: IRessource, pos = 0): Ressource {
|
|
|
const existingRessource = this.getRessourceFromId(ressource.id);
|
|
|
if (existingRessource) {
|
|
|
@@ -844,8 +843,8 @@ class Timeline extends LitElement {
|
|
|
</td>
|
|
|
</tr>`;
|
|
|
}
|
|
|
- private renderGridRow(columns: Array<Dayjs>, rowId = -1, height = 30): TemplateResult {
|
|
|
- return html`<tr row-id="${rowId}">
|
|
|
+ private renderGridRow(columns: Array<Dayjs>, id = "", height = 30): TemplateResult {
|
|
|
+ return html`<tr ressourceid="${id}">
|
|
|
${columns.map(
|
|
|
(d, i) =>
|
|
|
html`<td
|
|
|
@@ -923,7 +922,7 @@ class Timeline extends LitElement {
|
|
|
|
|
|
<tbody>
|
|
|
${this.rows.length > 0
|
|
|
- ? displayedRows.map((o) => this.renderGridRow(columns, o.i, o.r.height))
|
|
|
+ ? displayedRows.map((o) => this.renderGridRow(columns, o.r.id, o.r.height))
|
|
|
: this.renderGridRow(columns)}
|
|
|
</tbody>
|
|
|
</table>
|