|
@@ -1428,6 +1428,18 @@ export class Timeline extends TimelineEventsEmitter {
|
|
|
this.renderTimeline();
|
|
|
};
|
|
|
|
|
|
+ /**
|
|
|
+ * Get row by y coordinate.
|
|
|
+ * @param posY y screen coordinate.
|
|
|
+ */
|
|
|
+ public getRowByY(posY: number): TimelineRow {
|
|
|
+ const model = this.calculateRowsBounds();
|
|
|
+ if (model && model.rows) {
|
|
|
+ return model.rows.find((rowData) => rowData.y >= posY && posY <= rowData.y + rowData.height);
|
|
|
+ }
|
|
|
+
|
|
|
+ return null;
|
|
|
+ }
|
|
|
/**
|
|
|
* Find sharp pixel position
|
|
|
*/
|