Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
I
i20rzslider
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jedife
i20rzslider
Commits
9b56ae52
Commit
9b56ae52
authored
May 21, 2015
by
Rafal Zajac
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/stoimen/angularjs-slider
into stoimen-master
parents
1e1f96ee
8f9bf55e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
12 deletions
+27
-12
rzslider.js
rzslider.js
+27
-12
No files found.
rzslider.js
View file @
9b56ae52
...
...
@@ -194,6 +194,8 @@ function throttle(func, wait, options) {
{
var
self
=
this
;
this
.
unbinders
=
[];
if
(
this
.
scope
.
rzSliderTranslate
)
{
this
.
customTrFn
=
this
.
scope
.
rzSliderTranslate
();
...
...
@@ -218,7 +220,7 @@ function throttle(func, wait, options) {
this
.
scope
.
$on
(
'reCalcViewDimensions'
,
angular
.
bind
(
this
,
this
.
calcViewDimensions
));
// Recalculate stuff if view port dimensions have changed
angular
.
element
(
window
).
on
(
'resize'
,
angular
.
bind
(
this
,
this
.
calcViewDimensions
));
angular
.
element
(
window
).
on
(
'resize
.rzslider
'
,
angular
.
bind
(
this
,
this
.
calcViewDimensions
));
this
.
initRun
=
true
;
...
...
@@ -255,28 +257,41 @@ function throttle(func, wait, options) {
// Watchers
this
.
scope
.
$watch
(
'rzSliderModel'
,
function
(
newValue
,
oldValue
)
this
.
unbinders
.
push
(
this
.
scope
.
$watch
(
'rzSliderModel'
,
function
(
newValue
,
oldValue
)
{
if
(
newValue
===
oldValue
)
return
;
thrLow
();
});
})
)
;
this
.
scope
.
$watch
(
'rzSliderHigh'
,
function
(
newValue
,
oldValue
)
this
.
unbinders
.
push
(
this
.
scope
.
$watch
(
'rzSliderHigh'
,
function
(
newValue
,
oldValue
)
{
if
(
newValue
===
oldValue
)
return
;
thrHigh
();
});
})
)
;
this
.
scope
.
$watch
(
'rzSliderFloor'
,
function
(
newValue
,
oldValue
)
this
.
unbinders
.
push
(
this
.
scope
.
$watch
(
'rzSliderFloor'
,
function
(
newValue
,
oldValue
)
{
if
(
newValue
===
oldValue
)
return
;
self
.
resetSlider
();
});
})
)
;
this
.
scope
.
$watch
(
'rzSliderCeil'
,
function
(
newValue
,
oldValue
)
this
.
unbinders
.
push
(
this
.
scope
.
$watch
(
'rzSliderCeil'
,
function
(
newValue
,
oldValue
)
{
if
(
newValue
===
oldValue
)
return
;
self
.
resetSlider
();
}));
this
.
sliderElem
.
on
(
'$destroy'
,
function
()
{
self
.
minH
.
off
(
'.rzslider'
);
self
.
maxH
.
off
(
'.rzslider'
);
$document
.
off
(
'.rzslider'
);
angular
.
element
(
window
).
off
(
'.rzslider'
);
});
this
.
scope
.
$on
(
'$destroy'
,
function
()
{
self
.
unbinders
.
map
(
function
(
unbind
)
{
unbind
();
});
});
},
...
...
@@ -753,11 +768,11 @@ function throttle(func, wait, options) {
*/
bindEvents
:
function
()
{
this
.
minH
.
on
(
'mousedown'
,
angular
.
bind
(
this
,
this
.
onStart
,
this
.
minH
,
'rzSliderModel'
));
if
(
this
.
range
)
{
this
.
maxH
.
on
(
'mousedown'
,
angular
.
bind
(
this
,
this
.
onStart
,
this
.
maxH
,
'rzSliderHigh'
))
}
this
.
minH
.
on
(
'mousedown
.rzslider
'
,
angular
.
bind
(
this
,
this
.
onStart
,
this
.
minH
,
'rzSliderModel'
));
if
(
this
.
range
)
{
this
.
maxH
.
on
(
'mousedown
.rzslider
'
,
angular
.
bind
(
this
,
this
.
onStart
,
this
.
maxH
,
'rzSliderHigh'
))
}
this
.
minH
.
on
(
'touchstart'
,
angular
.
bind
(
this
,
this
.
onStart
,
this
.
minH
,
'rzSliderModel'
));
if
(
this
.
range
)
{
this
.
maxH
.
on
(
'touchstart'
,
angular
.
bind
(
this
,
this
.
onStart
,
this
.
maxH
,
'rzSliderHigh'
))
}
this
.
minH
.
on
(
'touchstart
.rzslider
'
,
angular
.
bind
(
this
,
this
.
onStart
,
this
.
minH
,
'rzSliderModel'
));
if
(
this
.
range
)
{
this
.
maxH
.
on
(
'touchstart
.rzslider
'
,
angular
.
bind
(
this
,
this
.
onStart
,
this
.
maxH
,
'rzSliderHigh'
))
}
},
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment