glider-rails 0.1.4.3 → 0.1.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  ###
2
- glider 0.1.4.3 - AngularJS slider
2
+ glider 0.1.4.4 - AngularJS slider
3
3
  https://github.com/evrone/glider
4
4
  Copyright (c) 2013 Valentin Vasilyev, Dmitry Karpunin
5
5
  Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
@@ -119,10 +119,13 @@ gliderModule.directive 'slider', ['$document', ($document) ->
119
119
 
120
120
  scope.$watch 'value', (newVal, oldVal) ->
121
121
  return if dragging
122
- if scope.min() <= newVal <= scope.max()
123
- refreshHandle()
122
+ if isFinite(newVal)
123
+ if scope.min() <= newVal <= scope.max()
124
+ refreshHandle()
125
+ else
126
+ scope.value = bound(newVal, scope.min(), scope.max())
124
127
  else
125
- scope.value = bound(newVal, scope.min(), scope.max())
128
+ scope.value = if isFinite(oldVal) then oldVal else scope.min()
126
129
 
127
130
  scope.step = (steps) ->
128
131
  doStep = (steps)->
@@ -1,6 +1,6 @@
1
1
  // Generated by CoffeeScript 1.6.3
2
2
  /*
3
- glider 0.1.4.3 - AngularJS slider
3
+ glider 0.1.4.4 - AngularJS slider
4
4
  https://github.com/evrone/glider
5
5
  Copyright (c) 2013 Valentin Vasilyev, Dmitry Karpunin
6
6
  Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
@@ -134,10 +134,14 @@
134
134
  if (dragging) {
135
135
  return;
136
136
  }
137
- if ((scope.min() <= newVal && newVal <= scope.max())) {
138
- return refreshHandle();
137
+ if (isFinite(newVal)) {
138
+ if ((scope.min() <= newVal && newVal <= scope.max())) {
139
+ return refreshHandle();
140
+ } else {
141
+ return scope.value = bound(newVal, scope.min(), scope.max());
142
+ }
139
143
  } else {
140
- return scope.value = bound(newVal, scope.min(), scope.max());
144
+ return scope.value = isFinite(oldVal) ? oldVal : scope.min();
141
145
  }
142
146
  });
143
147
  scope.step = function(steps) {
data/glider-rails.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = "glider-rails"
7
- gem.version = "0.1.4.3"
7
+ gem.version = "0.1.4.4"
8
8
  gem.authors = ["Valentin Valve Vasilyev", "Dmitry KODer Karpunin"]
9
9
  gem.email = ["iamvalentin@gmail.com", "koderfunk@gmail.com"]
10
10
  gem.description = "Glider, AngularJS UI slider for rails asset pipeline"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glider-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4.3
4
+ version: 0.1.4.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: