volt-google-maps 0.0.2 → 0.0.3

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: e10c77d992b5dbf71902d06f66d890810aabaefc
4
- data.tar.gz: d5cc43187191d9a2813369985b0722d629a3a720
3
+ metadata.gz: c4b2a866c7bdf8a045d291c79ed098f9e650c1d4
4
+ data.tar.gz: 287289f701d5e80c9877bf2458fc03869807456a
5
5
  SHA512:
6
- metadata.gz: 5c37a3c7aa2dc4504592661ef7339e645f35698c03ba14bbeeead53e7e7b02c65cfd665569f0896e56cb11eef8a94c977cdd3e0474eb548d0cffea3f9c8ec322
7
- data.tar.gz: bf4b5bb9e717f55ee3c57096a3120f9751964f99ab4d1d0c4f198face9ee4205e673852cd97535d705bd105dae1e5f9bc468f79f93598fd059e6f513febb4772
6
+ metadata.gz: 6ae9b93c42b4c69c806614377dbb883aa86e114627c69a2bd9e4078b2a68e5fd31747bb51b29f4dbf8bfb324ece35ed62c655fd922cdec77e9ad239644e86803
7
+ data.tar.gz: 3dd584f193a7b760d33e19160a028b5b9015d076315d4a3bfcd3b1f4921c0f2e813d759668d9d7db1c1dd802ec3e97bee5300494d0c870b8b497c368a3956d2a
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.3
@@ -52,20 +52,25 @@ module GoogleMaps
52
52
  end
53
53
  end
54
54
 
55
- @add_listener = markers.on('added') do |index|
56
- marker = markers[index]
55
+ @add_listener.remove if @add_listener
56
+ @remove_listener.remove if @remove_listener
57
57
 
58
- puts "ADD MARKER AT: #{index}"
59
- add_marker(marker) do |result|
60
- @markers[index] = result
58
+ if markers.respond_to?(:on)
59
+ @add_listener = markers.on('added') do |index|
60
+ marker = markers[index]
61
+
62
+ puts "ADD MARKER AT: #{index}"
63
+ add_marker(marker) do |result|
64
+ @markers[index] = result
65
+ end
61
66
  end
62
- end
63
67
 
64
- @remove_listener = markers.on('removed') do |index|
65
- puts "DELETE AT INDEX: #{index}"
66
- marker = @markers.delete_at(index)
67
- `console.log('marker: ', marker);`
68
- remove_marker(marker.to_n)
68
+ @remove_listener = markers.on('removed') do |index|
69
+ puts "DELETE AT INDEX: #{index}"
70
+ marker = @markers.delete_at(index)
71
+ `console.log('marker: ', marker);`
72
+ remove_marker(marker.to_n)
73
+ end
69
74
  end
70
75
 
71
76
  end.watch!
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.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Stout