From 88fc6ecc5c5b7ed3c36e9baca74e9fbfa48a17c5 Mon Sep 17 00:00:00 2001 From: Davis Kim Date: Mon, 11 Jan 2016 18:54:45 -0800 Subject: [PATCH] Fix orf/olf being undefined --- src/core/core.tooltip.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/core.tooltip.js b/src/core/core.tooltip.js index 001247d76..96b1d80c3 100644 --- a/src/core/core.tooltip.js +++ b/src/core/core.tooltip.js @@ -362,13 +362,14 @@ if (this._model.yAlign === 'center') { lf = function(x) { return x <= midX; }; rf = function(x) { return x > midX; }; - olf = function(x) { return x + size.width > _this._chart.width; }; - orf = function(x) { return x - size.width < 0; }; - yf = function(y) { return y <= midY ? 'top' : 'bottom'; }; } else { lf = function(x) { return x <= (size.width / 2); }; rf = function(x) { return x >= (_this._chart.width - (size.width / 2)); }; } + + olf = function(x) { return x + size.width > _this._chart.width; }; + orf = function(x) { return x - size.width < 0; }; + yf = function(y) { return y <= midY ? 'top' : 'bottom'; }; if (lf(this._model.x)) { this._model.xAlign = 'left';