This repository has been archived by the owner on May 30, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 401
Implemented RTL feature. #245
Open
NayanKhedkar
wants to merge
17
commits into
andreruffert:develop
Choose a base branch
from
NayanKhedkar:develop
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 8 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
28e1dc0
Added code for RTL feature
NayanKhedkar adf5ef6
add css class for RTL
NayanKhedkar 806affb
refactor implementation for data-direction
NayanKhedkar 1d5c5f5
added classes for data-direction
NayanKhedkar c521a44
Update rangeslider.js
NayanKhedkar 76e1d5c
Update rangeslider.css
NayanKhedkar f2ce666
Update rangeslider.min.js
NayanKhedkar f660cac
typo mistake
NayanKhedkar 7816675
no more requred
NayanKhedkar a56bdd4
Update rangeslider.css
NayanKhedkar a03b263
removed extra space
NayanKhedkar cb4765d
Update rangeslider.js
NayanKhedkar 559e5dd
code beautified
NayanKhedkar 9d0f903
removed spacing
NayanKhedkar c46116f
Merge branch 'develop' into develop
NayanKhedkar b5044fd
Update rangeslider.js
NayanKhedkar 3146a94
Merge branch 'develop' into develop
NayanKhedkar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,111 +1,124 @@ | ||
.rangeslider, | ||
.rangeslider__fill { | ||
display: block; | ||
-moz-box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.3); | ||
-webkit-box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.3); | ||
box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.3); | ||
-moz-border-radius: 10px; | ||
-webkit-border-radius: 10px; | ||
border-radius: 10px; | ||
display: block; | ||
-moz-box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.3); | ||
-webkit-box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.3); | ||
box-shadow: inset 0px 1px 3px rgba(0, 0, 0, 0.3); | ||
-moz-border-radius: 10px; | ||
-webkit-border-radius: 10px; | ||
border-radius: 10px; | ||
} | ||
|
||
.rangeslider { | ||
background: #e6e6e6; | ||
position: relative; | ||
background: #e6e6e6; | ||
position: relative; | ||
} | ||
|
||
.rangeslider--horizontal { | ||
height: 20px; | ||
width: 100%; | ||
height: 20px; | ||
width: 100%; | ||
} | ||
|
||
.rangeslider--vertical { | ||
width: 20px; | ||
min-height: 150px; | ||
max-height: 100%; | ||
width: 20px; | ||
min-height: 150px; | ||
max-height: 100%; | ||
} | ||
/*right-to-left*/ | ||
.rangeslider__rtl { | ||
direction: rtl; | ||
} | ||
/*top-to-bottom*/ | ||
.rangeslider__ttb { | ||
top: 0; | ||
bottom: initial; | ||
} | ||
|
||
.rangeslider--disabled { | ||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40); | ||
opacity: 0.4; | ||
filter: progid: DXImageTransform.Microsoft.Alpha(Opacity=40); | ||
opacity: 0.4; | ||
} | ||
|
||
.rangeslider__fill { | ||
background: #00ff00; | ||
position: absolute; | ||
background: #00ff00; | ||
position: absolute; | ||
} | ||
|
||
.rangeslider--horizontal .rangeslider__fill { | ||
top: 0; | ||
height: 100%; | ||
top: 0; | ||
height: 100%; | ||
} | ||
|
||
.rangeslider--vertical .rangeslider__fill { | ||
bottom: 0; | ||
width: 100%; | ||
bottom: 0; | ||
width: 100%; | ||
} | ||
|
||
.rangeslider__handle { | ||
background: white; | ||
border: 1px solid #ccc; | ||
cursor: pointer; | ||
display: inline-block; | ||
width: 40px; | ||
height: 40px; | ||
position: absolute; | ||
background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIwLjAiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMDAwMDAiIHN0b3Atb3BhY2l0eT0iMC4xIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g'); | ||
background-size: 100%; | ||
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(100%, rgba(0, 0, 0, 0.1))); | ||
background-image: -moz-linear-gradient(rgba(255, 255, 255, 0), rgba(0, 0, 0, 0.1)); | ||
background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0), rgba(0, 0, 0, 0.1)); | ||
background-image: linear-gradient(rgba(255, 255, 255, 0), rgba(0, 0, 0, 0.1)); | ||
-moz-box-shadow: 0 0 8px rgba(0, 0, 0, 0.3); | ||
-webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.3); | ||
box-shadow: 0 0 8px rgba(0, 0, 0, 0.3); | ||
-moz-border-radius: 50%; | ||
-webkit-border-radius: 50%; | ||
border-radius: 50%; | ||
background: white; | ||
border: 1px solid #ccc; | ||
cursor: pointer; | ||
display: inline-block; | ||
width: 40px; | ||
height: 40px; | ||
position: absolute; | ||
background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIgc3RvcC1vcGFjaXR5PSIwLjAiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMDAwMDAiIHN0b3Atb3BhY2l0eT0iMC4xIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PHJlY3QgeD0iMCIgeT0iMCIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsbD0idXJsKCNncmFkKSIgLz48L3N2Zz4g'); | ||
background-size: 100%; | ||
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(255, 255, 255, 0)), color-stop(100%, rgba(0, 0, 0, 0.1))); | ||
background-image: -moz-linear-gradient(rgba(255, 255, 255, 0), rgba(0, 0, 0, 0.1)); | ||
background-image: -webkit-linear-gradient(rgba(255, 255, 255, 0), rgba(0, 0, 0, 0.1)); | ||
background-image: linear-gradient(rgba(255, 255, 255, 0), rgba(0, 0, 0, 0.1)); | ||
-moz-box-shadow: 0 0 8px rgba(0, 0, 0, 0.3); | ||
-webkit-box-shadow: 0 0 8px rgba(0, 0, 0, 0.3); | ||
box-shadow: 0 0 8px rgba(0, 0, 0, 0.3); | ||
-moz-border-radius: 50%; | ||
-webkit-border-radius: 50%; | ||
border-radius: 50%; | ||
} | ||
|
||
.rangeslider__handle:after { | ||
content: ""; | ||
display: block; | ||
width: 18px; | ||
height: 18px; | ||
margin: auto; | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
bottom: 0; | ||
left: 0; | ||
background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjEzIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjZmZmZmZmIiBzdG9wLW9wYWNpdHk9IjAuMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); | ||
background-size: 100%; | ||
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(0, 0, 0, 0.13)), color-stop(100%, rgba(255, 255, 255, 0))); | ||
background-image: -moz-linear-gradient(rgba(0, 0, 0, 0.13), rgba(255, 255, 255, 0)); | ||
background-image: -webkit-linear-gradient(rgba(0, 0, 0, 0.13), rgba(255, 255, 255, 0)); | ||
background-image: linear-gradient(rgba(0, 0, 0, 0.13), rgba(255, 255, 255, 0)); | ||
-moz-border-radius: 50%; | ||
-webkit-border-radius: 50%; | ||
border-radius: 50%; | ||
} | ||
.rangeslider__handle:active, .rangeslider--active .rangeslider__handle { | ||
background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjEiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMDAwMDAiIHN0b3Atb3BhY2l0eT0iMC4xMiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); | ||
background-size: 100%; | ||
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(0, 0, 0, 0.1)), color-stop(100%, rgba(0, 0, 0, 0.12))); | ||
background-image: -moz-linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.12)); | ||
background-image: -webkit-linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.12)); | ||
background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.12)); | ||
content: ""; | ||
display: block; | ||
width: 18px; | ||
height: 18px; | ||
margin: auto; | ||
position: absolute; | ||
top: 0; | ||
right: 0; | ||
bottom: 0; | ||
left: 0; | ||
background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjEzIi8+PHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjZmZmZmZmIiBzdG9wLW9wYWNpdHk9IjAuMCIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); | ||
background-size: 100%; | ||
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(0, 0, 0, 0.13)), color-stop(100%, rgba(255, 255, 255, 0))); | ||
background-image: -moz-linear-gradient(rgba(0, 0, 0, 0.13), rgba(255, 255, 255, 0)); | ||
background-image: -webkit-linear-gradient(rgba(0, 0, 0, 0.13), rgba(255, 255, 255, 0)); | ||
background-image: linear-gradient(rgba(0, 0, 0, 0.13), rgba(255, 255, 255, 0)); | ||
-moz-border-radius: 50%; | ||
-webkit-border-radius: 50%; | ||
border-radius: 50%; | ||
} | ||
|
||
.rangeslider__handle:active, | ||
.rangeslider--active .rangeslider__handle { | ||
background-image: url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJvYmplY3RCb3VuZGluZ0JveCIgeDE9IjAuNSIgeTE9IjAuMCIgeDI9IjAuNSIgeTI9IjEuMCI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjEiLz48c3RvcCBvZmZzZXQ9IjEwMCUiIHN0b3AtY29sb3I9IiMwMDAwMDAiIHN0b3Atb3BhY2l0eT0iMC4xMiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA=='); | ||
background-size: 100%; | ||
background-image: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, rgba(0, 0, 0, 0.1)), color-stop(100%, rgba(0, 0, 0, 0.12))); | ||
background-image: -moz-linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.12)); | ||
background-image: -webkit-linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.12)); | ||
background-image: linear-gradient(rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.12)); | ||
} | ||
|
||
.rangeslider--horizontal .rangeslider__handle { | ||
top: -10px; | ||
touch-action: pan-y; | ||
-ms-touch-action: pan-y; | ||
top: -10px; | ||
touch-action: pan-y; | ||
-ms-touch-action: pan-y; | ||
} | ||
|
||
.rangeslider--vertical .rangeslider__handle { | ||
left: -10px; | ||
touch-action: pan-x; | ||
-ms-touch-action: pan-x; | ||
left: -10px; | ||
touch-action: pan-x; | ||
-ms-touch-action: pan-x; | ||
} | ||
|
||
input[type="range"]:focus + .rangeslider .rangeslider__handle { | ||
-moz-box-shadow: 0 0 8px rgba(255, 0, 255, 0.9); | ||
-webkit-box-shadow: 0 0 8px rgba(255, 0, 255, 0.9); | ||
box-shadow: 0 0 8px rgba(255, 0, 255, 0.9); | ||
-moz-box-shadow: 0 0 8px rgba(255, 0, 255, 0.9); | ||
-webkit-box-shadow: 0 0 8px rgba(255, 0, 255, 0.9); | ||
box-shadow: 0 0 8px rgba(255, 0, 255, 0.9); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,8 @@ | |
activeClass: 'rangeslider--active', | ||
horizontalClass: 'rangeslider--horizontal', | ||
verticalClass: 'rangeslider--vertical', | ||
dirRTLClass:'rangeslider__rtl', | ||
dirTTBClass:'rangeslider__ttb', | ||
fillClass: 'rangeslider__fill', | ||
handleClass: 'rangeslider__handle', | ||
startEvent: ['mousedown', 'touchstart', 'pointerdown'], | ||
|
@@ -52,14 +54,26 @@ | |
orientation: { | ||
horizontal: { | ||
dimension: 'width', | ||
direction: 'left', | ||
directionStyle: 'left', | ||
direction: { | ||
ltr: 'left', | ||
rtl: 'right' | ||
}, | ||
directionStyle: { | ||
ltr: 'left', | ||
rtl: 'right' | ||
}, | ||
coordinate: 'x' | ||
}, | ||
vertical: { | ||
dimension: 'height', | ||
direction: 'top', | ||
directionStyle: 'bottom', | ||
direction: { | ||
btt:'top', | ||
ttb:'bottom' | ||
}, | ||
directionStyle: { | ||
btt:'bottom', | ||
ttb:'top' | ||
}, | ||
coordinate: 'y' | ||
} | ||
} | ||
|
@@ -208,7 +222,20 @@ | |
function ucfirst(str) { | ||
return str.charAt(0).toUpperCase() + str.substr(1); | ||
} | ||
|
||
/** | ||
* return direction rtl,ltr,btt,ttb | ||
* @param {String} element | ||
* @param {String} orientation | ||
*/ | ||
function getDirection(element,orientation){ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @NayanKhedkar, can you correct the spacing in this function? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
var direction=element[0].getAttribute('data-direction')||(orientation==='vertical'?'btt':'ltr') | ||
|
||
if(constants.orientation[orientation].direction[direction]){ | ||
return direction; | ||
}else{ | ||
return orientation==='vertical'?'btt':'ltr'; | ||
} | ||
} | ||
/** | ||
* Plugin | ||
* @param {String} element | ||
|
@@ -221,12 +248,13 @@ | |
this.options = $.extend( {}, defaults, options ); | ||
this.polyfill = this.options.polyfill; | ||
this.orientation = this.$element[0].getAttribute('data-orientation') || this.options.orientation; | ||
this.dir = getDirection(this.$element,this.orientation); | ||
this.onInit = this.options.onInit; | ||
this.onSlide = this.options.onSlide; | ||
this.onSlideEnd = this.options.onSlideEnd; | ||
this.DIMENSION = constants.orientation[this.orientation].dimension; | ||
this.DIRECTION = constants.orientation[this.orientation].direction; | ||
this.DIRECTION_STYLE = constants.orientation[this.orientation].directionStyle; | ||
this.DIRECTION = constants.orientation[this.orientation].direction[this.dir]; | ||
this.DIRECTION_STYLE = constants.orientation[this.orientation].directionStyle[this.dir]; | ||
this.COORDINATE = constants.orientation[this.orientation].coordinate; | ||
|
||
// Plugin should only be used as a polyfill | ||
|
@@ -240,10 +268,9 @@ | |
this.moveEvent = this.options.moveEvent.join('.' + this.identifier + ' ') + '.' + this.identifier; | ||
this.endEvent = this.options.endEvent.join('.' + this.identifier + ' ') + '.' + this.identifier; | ||
this.toFixed = (this.step + '').replace('.', '').length - 1; | ||
this.$fill = $('<div class="' + this.options.fillClass + '" />'); | ||
this.$fill = $('<div class="' + this.options.fillClass +' '+(this.dir==='ttb'&&this.orientation==='vertical'? this.options.dirTTBClass: '') +'" />'); | ||
this.$handle = $('<div class="' + this.options.handleClass + '" />'); | ||
this.$range = $('<div class="' + this.options.rangeClass + ' ' + this.options[this.orientation + 'Class'] + '" id="' + this.identifier + '" />').insertAfter(this.$element).prepend(this.$fill, this.$handle); | ||
|
||
this.$range = $('<div class="' + this.options.rangeClass +' ' +(this.dir==='rtl'&&this.orientation==='horizontal'? this.options.dirRTLClass: '') + ' ' + this.options[this.orientation + 'Class'] + '" id="' + this.identifier + '" />').insertAfter(this.$element).prepend(this.$fill, this.$handle); | ||
// visually hide the input | ||
this.$element.css({ | ||
'position': 'absolute', | ||
|
@@ -424,7 +451,7 @@ | |
pageCoordinate = e.currentPoint[this.COORDINATE]; | ||
} | ||
|
||
return pageCoordinate - rangePos; | ||
return (this.dir==='rtl'||this.dir==='ttb') ? rangePos - pageCoordinate:pageCoordinate - rangePos; | ||
}; | ||
|
||
Plugin.prototype.getPositionFromValue = function(value) { | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
initial
isn't supported in Internet Explorer.