volt-google-maps 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7c820bd4a6ffce1a029e189c88ca2ea072622fd2
4
- data.tar.gz: 6a6aa20a6db7f1d35346c7602b7a8024e9527333
3
+ metadata.gz: 189dec9b1e44e6a21bfce926e6c17322cb8ec1b8
4
+ data.tar.gz: 25be316b2d13b9b0ff5120283567afa29c4f825e
5
5
  SHA512:
6
- metadata.gz: 69863431886859067d0516c636aaad199485921f9206ff0920ed68fc05b301c7de5fc8d8c7be60d092dc166091cd395fa1ed14ee79cff83dc58b35b0aaec83fa
7
- data.tar.gz: 395362bd5710784147dcb98d1ee586fedd13237a1bb3bf5124810f5f245f4991573cfc6d853fb46ca7205661e6464ce9a76090181a65016988d891df18505307
6
+ metadata.gz: f4a2f26f160e51d880750e1169234174fa0217e9adfad197a5016b86fa7d84e3c655176bc5b49cf57866442da864f00f5afef2a782747733bcc7e8305bff2555
7
+ data.tar.gz: 0ee6d4bd8dd18777e2820206ed6fc69213a3a5228c0f1c78305f2ef46cfbfdddae43f055c16e62805a8e2562468a42ccd24a092424dd4380b5f6979d6577b334
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.5
1
+ 0.0.6
@@ -80,6 +80,7 @@ module GoogleMaps
80
80
  `google.maps.event.addListener(self.map, 'zoom_changed', function() {
81
81
  var zoomLevel = self.map.getZoom();`
82
82
 
83
+ @changing_zoom = true
83
84
  new_zoom = Native(`zoomLevel`)
84
85
  if attrs.zoom != new_zoom && attrs.respond_to?(:zoom=)
85
86
  attrs.zoom = new_zoom
@@ -87,24 +88,29 @@ module GoogleMaps
87
88
 
88
89
  # Setup listener again
89
90
  set_zoom
91
+
92
+ @changing_zoom = false
93
+
90
94
  `});`
91
95
 
92
96
  end
93
97
 
94
98
  def set_zoom
95
99
  -> do
96
- level = attrs.zoom
97
- if level.blank?
98
- level = 8
99
- else
100
- level = (level || 8).to_i
101
- end
100
+ attrs.zoom
101
+ unless @changing_zoom
102
+ level = attrs.zoom
103
+ if level.blank?
104
+ level = 8
105
+ else
106
+ level = (level || 8).to_i
107
+ end
102
108
 
103
- puts "SET LEVEL: #{level.inspect}"
104
- level_n = level.to_n
105
- `if (self.map.getZoom() != level_n) {`
106
- `self.map.setZoom(level_n);`
107
- `}`
109
+ level_n = level.to_n
110
+ `if (self.map.getZoom() != level_n) {`
111
+ `self.map.setZoom(level_n);`
112
+ `}`
113
+ end
108
114
  end.watch!
109
115
  end
110
116
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: volt-google-maps
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Stout