]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Fix orf/olf being undefined 1892/head
authorDavis Kim <davis@blackbird.am>
Tue, 12 Jan 2016 02:54:45 +0000 (18:54 -0800)
committerDavis Kim <davis@blackbird.am>
Tue, 12 Jan 2016 02:54:45 +0000 (18:54 -0800)
src/core/core.tooltip.js

index 001247d763f07844dd51842cee001dc58e56518d..96b1d80c3a0de880866d92498e10771505f12d8d 100644 (file)
                        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';