one-time hints; builder touchups
This commit is contained in:
@@ -8,6 +8,7 @@ import {tvCustomThemes} from "../../theme.js";
|
||||
export let widget = null
|
||||
export let chart = null
|
||||
export let crosshairPoint = null
|
||||
export let defaultShapeHandler = null // if set, then TV events that dont have a registered shape handler get passed directly to this function
|
||||
let symbolChangedCbs = [] // callbacks for TV's chart.onSymbolChanged()
|
||||
|
||||
|
||||
@@ -268,6 +269,7 @@ export function drawShape(shapeType, ...callbacks) {
|
||||
drawingTool = null
|
||||
previousDrawingTool = widget.selectedLineTool()
|
||||
co.drawing = true
|
||||
co.drew = false
|
||||
widget.selectLineTool(shapeType.code)
|
||||
invokeCallbacks(callbacks, 'onDraw')
|
||||
}
|
||||
@@ -462,9 +464,11 @@ function doHandleDrawingEvent(id, event) {
|
||||
const props = shape.getProperties()
|
||||
if (id in shapeCallbacks)
|
||||
invokeCallbacks(shapeCallbacks[id], 'onProps', id, shape, props)
|
||||
else
|
||||
// otherwise it's an event on a shape we don't "own"
|
||||
else {
|
||||
// otherwise it's an event on a shape we don't "own" that could be being drawn
|
||||
co.drew = true
|
||||
console.log('warning: ignoring setProperties on TV shape', id, props)
|
||||
}
|
||||
} else if (event === 'move') {
|
||||
if (id in shapeCallbacks) {
|
||||
invokeCallbacks(shapeCallbacks[id], 'onMove', id, shape)
|
||||
|
||||
Reference in New Issue
Block a user