From a60deeba3623e0610253a1477a1b45f69007f32a Mon Sep 17 00:00:00 2001 From: jlukic Date: Wed, 8 Apr 2015 14:33:49 -0400 Subject: [PATCH] Formatting on rtl --- src/definitions/modules/popup.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/definitions/modules/popup.js b/src/definitions/modules/popup.js index 36609665a..f0002714c 100644 --- a/src/definitions/modules/popup.js +++ b/src/definitions/modules/popup.js @@ -598,10 +598,13 @@ $.fn.popup = function(parameters) { set: { position: function(position, arrowOffset) { + + // exit conditions if($target.length == 0 || $popup.length == 0) { module.error(error.notFound); return; } + var windowWidth = $(window).width(), windowHeight = $(window).height(), @@ -623,7 +626,9 @@ $.fn.popup = function(parameters) { ? parseInt( window.getComputedStyle(targetElement).getPropertyValue('margin-top'), 10) : 0, marginLeft = (settings.inline) - ? parseInt( window.getComputedStyle(targetElement).getPropertyValue(module.is.rtl() ? 'margin-right' : 'margin-left'), 10) + ? module.is.rtl() + ? parseInt( window.getComputedStyle(targetElement).getPropertyValue('margin-right'), 10) + : parseInt( window.getComputedStyle(targetElement).getPropertyValue('margin-left') , 10) : 0, target = (settings.inline || settings.popup)