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 +4 -4
- data/VERSION +1 -1
- data/app/google-maps/controllers/main_controller.rb +17 -11
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 189dec9b1e44e6a21bfce926e6c17322cb8ec1b8
|
4
|
+
data.tar.gz: 25be316b2d13b9b0ff5120283567afa29c4f825e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4a2f26f160e51d880750e1169234174fa0217e9adfad197a5016b86fa7d84e3c655176bc5b49cf57866442da864f00f5afef2a782747733bcc7e8305bff2555
|
7
|
+
data.tar.gz: 0ee6d4bd8dd18777e2820206ed6fc69213a3a5228c0f1c78305f2ef46cfbfdddae43f055c16e62805a8e2562468a42ccd24a092424dd4380b5f6979d6577b334
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
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
|
-
|
97
|
-
|
98
|
-
level =
|
99
|
-
|
100
|
-
|
101
|
-
|
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
|
-
|
104
|
-
|
105
|
-
|
106
|
-
`
|
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
|
|