no more getUserPosition

This commit is contained in:
Luis Fernando Molina committed 2020-01-30 22:04:48 +01:00
1 parent 73b9458396
commit b449ec4ad9
2 files changed
+16 -8

No files matched your search

+8 -4
View File
@@ -50,6 +50,7 @@
let candles = []; // Here we keep the candles to be ploted every time the Draw() function is called by the AAWebPlatform.
let onMouseOverEventSuscriptionId
let zoomChangedEventSubscriptionId
let offsetChangedEventSubscriptionId
let dragFinishedEventSubscriptionId
@@ -63,7 +64,7 @@
try {
/* Stop listening to the necesary events. */
thisObject.container.eventHandler.stopListening(onMouseOverEventSuscriptionId)
canvas.chartSpace.viewport.eventHandler.stopListening(zoomChangedEventSubscriptionId);
canvas.chartSpace.viewport.eventHandler.stopListening(offsetChangedEventSubscriptionId);
canvas.eventHandler.stopListening(dragFinishedEventSubscriptionId);
@@ -120,6 +121,7 @@
dragFinishedEventSubscriptionId = canvas.eventHandler.listenToEvent("Drag Finished", onDragFinished);
marketFilesUpdatedEventSubscriptionId = marketFiles.eventHandler.listenToEvent("Files Updated", onMarketFilesUpdated);
dailyFilesUpdatedEventSubscriptionId = dailyFiles.eventHandler.listenToEvent("Files Updated", onDailyFilesUpdated);
onMouseOverEventSuscriptionId = thisObject.container.eventHandler.listenToEvent('onMouseOver', onMouseOver)
/* Get ready for plotting. */
@@ -137,6 +139,11 @@
}
}
function onMouseOver(event) {
let userPosition = getDateFromPoint(event, thisObject.container, coordinateSystem)
userPositionDate = userPosition.valueOf()
}
function getContainer(point) {
try {
@@ -462,9 +469,6 @@
try {
let userPosition = getUserPosition()
let userPositionDate = userPosition.point.x
if (candles.length > 0) {
/* Now we calculate all the points. */
+8 -4
View File
@@ -49,6 +49,7 @@
let volumes = []; // Here we keep the volumes to be ploted every time the Draw() function is called by the AAWebPlatform.
let onMouseOverEventSuscriptionId
let zoomChangedEventSubscriptionId
let offsetChangedEventSubscriptionId
let dragFinishedEventSubscriptionId
@@ -62,7 +63,7 @@
try {
/* Stop listening to the necesary events. */
thisObject.container.eventHandler.stopListening(onMouseOverEventSuscriptionId)
canvas.chartSpace.viewport.eventHandler.stopListening(zoomChangedEventSubscriptionId);
canvas.chartSpace.viewport.eventHandler.stopListening(offsetChangedEventSubscriptionId);
canvas.eventHandler.stopListening(dragFinishedEventSubscriptionId);
@@ -119,6 +120,7 @@
dragFinishedEventSubscriptionId = canvas.eventHandler.listenToEvent("Drag Finished", onDragFinished);
marketFilesUpdatedEventSubscriptionId = marketFiles.eventHandler.listenToEvent("Files Updated", onMarketFilesUpdated);
dailyFilesUpdatedEventSubscriptionId = dailyFiles.eventHandler.listenToEvent("Files Updated", onDailyFilesUpdated);
onMouseOverEventSuscriptionId = thisObject.container.eventHandler.listenToEvent('onMouseOver', onMouseOver)
/* Get ready for plotting. */
@@ -140,6 +142,11 @@
}
}
function onMouseOver(event) {
let userPosition = getDateFromPoint(event, thisObject.container, coordinateSystem)
userPositionDate = userPosition.valueOf()
}
function recalculateScale() {
recalculateScaleX();
@@ -522,9 +529,6 @@
try {
let userPosition = getUserPosition()
let userPositionDate = userPosition.point.x
if (volumes.length > 0) {
/* Now we calculate and plot the volumes */