From a78aaf30f499fbdf6df23a9866c491315d0a5883 Mon Sep 17 00:00:00 2001 From: Aleksander Korolev Date: Mon, 21 Nov 2016 17:37:08 +0300 Subject: [PATCH] Add 'right' css options for use with rtl directions of page; --- spin.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spin.js b/spin.js index 52a1b26..6d15f7c 100644 --- a/spin.js +++ b/spin.js @@ -160,6 +160,7 @@ className: 'spinner', // CSS class to assign to the element top: '50%', // center vertically left: '50%', // center horizontally + right: 'auto', // default value for right position shadow: false, // Whether to render a shadow hwaccel: false, // Whether to use hardware acceleration position: 'absolute' // Element positioning @@ -191,7 +192,8 @@ width: 0, zIndex: o.zIndex, left: o.left, - top: o.top + top: o.top, + right: o.right }); if (target) {