From 9bc67c9c68d4818690cc46b2881e856e9cba7085 Mon Sep 17 00:00:00 2001 From: Cavitt Date: Thu, 19 Jun 2014 12:03:56 -0500 Subject: [PATCH 1/2] Fixed vertical slider check when obfuscated In #477, support for vertical slider computation was added. The config check breaks when obfuscated, it ends up being something like `if(a.j.Wd)` I've just started to familiarize myself with the code-base, but I believe `this.options().vertical` is the correct way to check an option. This should solve the obfuscation issue. --- src/js/slider.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/slider.js b/src/js/slider.js index cc3654f84a..50d984d651 100644 --- a/src/js/slider.js +++ b/src/js/slider.js @@ -128,7 +128,7 @@ vjs.Slider.prototype.calculateDistance = function(event){ boxW = boxH = el.offsetWidth; handle = this.handle; - if (this.options_.vertical) { + if (this.options().vertical) { boxY = box.top; if (event.changedTouches) { From 1fbfe65353184af3eb1ccd9987f715d4a4e739c7 Mon Sep 17 00:00:00 2001 From: Cavitt Date: Thu, 19 Jun 2014 13:34:45 -0500 Subject: [PATCH 2/2] Changed property name to use a literal. --- src/js/slider.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/js/slider.js b/src/js/slider.js index 50d984d651..30f3554449 100644 --- a/src/js/slider.js +++ b/src/js/slider.js @@ -128,7 +128,7 @@ vjs.Slider.prototype.calculateDistance = function(event){ boxW = boxH = el.offsetWidth; handle = this.handle; - if (this.options().vertical) { + if (this.options()['vertical']) { boxY = box.top; if (event.changedTouches) {