GetDroppedElementTime

Description

The GetDroppedElementTime method retrieves the time at the point where an object was dropped on the chart.

Syntax

public GetDroppedElementTime(): number

Return Value

Returns a number representing the Unix timestamp (in seconds) at the dropped point.

Example

try {
    const dropTime = this.api.GetDroppedElementTime()
    const date = new Date(dropTime * 1000)
    console.log(`Object dropped at time: ${date.toISOString()}`)
} catch (error) {
    console.error('Failed to get dropped element time:', error.message)
}

Last updated