placement, line drawing, and price display fixes (inverted test)
This commit is contained in:
@@ -22,7 +22,7 @@ export function removeSymbolChangedCallback(cb) {
|
||||
}
|
||||
|
||||
function changeSymbol(symbol) {
|
||||
console.log('change symbol', symbol)
|
||||
console.error('change symbol', symbol)
|
||||
if (symbol===null)
|
||||
co.selectedSymbol = null
|
||||
else {
|
||||
@@ -33,8 +33,13 @@ function changeSymbol(symbol) {
|
||||
}
|
||||
|
||||
|
||||
export function setSymbol(symbol) {
|
||||
widget.activeChart().setSymbol(symbol.ticker)
|
||||
export async function setSymbol(symbol) {
|
||||
await new Promise(resolve => {
|
||||
if (co.selectedSymbol?.ticker !== symbol.ticker)
|
||||
widget.activeChart().setSymbol(symbol.ticker, null, resolve)
|
||||
else
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -194,6 +199,9 @@ export function createShape(shapeType, points, options={}, ...callbacks) {
|
||||
console.error('tvShape could not create', shapeType, points, options, e)
|
||||
return null
|
||||
}
|
||||
if (shapeId===null) {
|
||||
console.error('could not create shape', points, options)
|
||||
}
|
||||
allShapeIds.push(shapeId)
|
||||
if( callbacks.length )
|
||||
shapeCallbacks[shapeId] = callbacks
|
||||
|
||||
Reference in New Issue
Block a user