|
49 | 49 | keyboardSupport: true,
|
50 | 50 | scale: 1,
|
51 | 51 | enforceRange: false,
|
| 52 | + onlyBindHandles: false, |
52 | 53 | onStart: null,
|
53 | 54 | onChange: null,
|
54 | 55 | onEnd: null
|
|
1197 | 1198 | barMove = this.onMove;
|
1198 | 1199 | }
|
1199 | 1200 |
|
1200 |
| - this.selBar.on('mousedown', angular.bind(this, barStart, null, barTracking)); |
1201 |
| - this.selBar.on('mousedown', angular.bind(this, barMove, this.selBar)); |
| 1201 | + if (!this.options.onlyBindHandles) { |
| 1202 | + this.selBar.on('mousedown', angular.bind(this, barStart, null, barTracking)); |
| 1203 | + this.selBar.on('mousedown', angular.bind(this, barMove, this.selBar)); |
| 1204 | + } |
1202 | 1205 |
|
1203 | 1206 | if (this.options.draggableRangeOnly) {
|
1204 | 1207 | this.minH.on('mousedown', angular.bind(this, barStart, null, barTracking));
|
|
1208 | 1211 | if (this.range) {
|
1209 | 1212 | this.maxH.on('mousedown', angular.bind(this, this.onStart, this.maxH, 'rzSliderHigh'));
|
1210 | 1213 | }
|
1211 |
| - this.fullBar.on('mousedown', angular.bind(this, this.onStart, null, null)); |
1212 |
| - this.fullBar.on('mousedown', angular.bind(this, this.onMove, this.fullBar)); |
1213 |
| - this.ticks.on('mousedown', angular.bind(this, this.onStart, null, null)); |
1214 |
| - this.ticks.on('mousedown', angular.bind(this, this.onMove, this.ticks)); |
| 1214 | + if (!this.options.onlyBindHandles) { |
| 1215 | + this.fullBar.on('mousedown', angular.bind(this, this.onStart, null, null)); |
| 1216 | + this.fullBar.on('mousedown', angular.bind(this, this.onMove, this.fullBar)); |
| 1217 | + this.ticks.on('mousedown', angular.bind(this, this.onStart, null, null)); |
| 1218 | + this.ticks.on('mousedown', angular.bind(this, this.onMove, this.ticks)); |
| 1219 | + } |
1215 | 1220 | }
|
1216 | 1221 |
|
1217 |
| - this.selBar.on('touchstart', angular.bind(this, barStart, null, barTracking)); |
1218 |
| - this.selBar.on('touchstart', angular.bind(this, barMove, this.selBar)); |
| 1222 | + if (!this.options.onlyBindHandles) { |
| 1223 | + this.selBar.on('touchstart', angular.bind(this, barStart, null, barTracking)); |
| 1224 | + this.selBar.on('touchstart', angular.bind(this, barMove, this.selBar)); |
| 1225 | + } |
1219 | 1226 | if (this.options.draggableRangeOnly) {
|
1220 | 1227 | this.minH.on('touchstart', angular.bind(this, barStart, null, barTracking));
|
1221 | 1228 | this.maxH.on('touchstart', angular.bind(this, barStart, null, barTracking));
|
|
1224 | 1231 | if (this.range) {
|
1225 | 1232 | this.maxH.on('touchstart', angular.bind(this, this.onStart, this.maxH, 'rzSliderHigh'));
|
1226 | 1233 | }
|
1227 |
| - this.fullBar.on('touchstart', angular.bind(this, this.onStart, null, null)); |
1228 |
| - this.fullBar.on('touchstart', angular.bind(this, this.onMove, this.fullBar)); |
1229 |
| - this.ticks.on('touchstart', angular.bind(this, this.onStart, null, null)); |
1230 |
| - this.ticks.on('touchstart', angular.bind(this, this.onMove, this.ticks)); |
| 1234 | + if (!this.options.onlyBindHandles) { |
| 1235 | + this.fullBar.on('touchstart', angular.bind(this, this.onStart, null, null)); |
| 1236 | + this.fullBar.on('touchstart', angular.bind(this, this.onMove, this.fullBar)); |
| 1237 | + this.ticks.on('touchstart', angular.bind(this, this.onStart, null, null)); |
| 1238 | + this.ticks.on('touchstart', angular.bind(this, this.onMove, this.ticks)); |
| 1239 | + } |
1231 | 1240 | }
|
1232 | 1241 |
|
1233 | 1242 | if (this.options.keyboardSupport) {
|
|
0 commit comments