From 42ac46c1e15b6b446491b6d3f7020f59f45e41b4 Mon Sep 17 00:00:00 2001 From: Maxime Beauchemin Date: Tue, 26 Apr 2016 09:29:19 -0700 Subject: [PATCH] [bugfix] fix context confusion in Slice --- caravel/assets/javascripts/modules/caravel.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/caravel/assets/javascripts/modules/caravel.js b/caravel/assets/javascripts/modules/caravel.js index 4931dfcdcddbe..b6b881077eab6 100644 --- a/caravel/assets/javascripts/modules/caravel.js +++ b/caravel/assets/javascripts/modules/caravel.js @@ -301,6 +301,7 @@ var px = (function () { }, bindResizeToWindowResize: function () { var resizeTimer; + var slice = this; $(window).on('resize', function (e) { clearTimeout(resizeTimer); resizeTimer = setTimeout(function () { @@ -314,7 +315,7 @@ var px = (function () { } this.force = force; token.find("img.loading").show(); - container.css('height', slice.height()); + container.css('height', this.height()); dttm = 0; timer = setInterval(stopwatch, 10); $('#timer').removeClass('btn-danger btn-success'); @@ -323,7 +324,7 @@ var px = (function () { }, resize: function () { token.find("img.loading").show(); - container.css('height', slice.height()); + container.css('height', this.height()); this.viz.render(); this.viz.resize(); },