socmap_adf 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/.DS_Store +0 -0
- data/CHANGELOG.md +12 -0
- data/MIT-LICENSE +1 -1
- data/lib/.DS_Store +0 -0
- data/lib/assets/.DS_Store +0 -0
- data/lib/assets/javascripts/.DS_Store +0 -0
- data/lib/assets/javascripts/socmap_adf/.DS_Store +0 -0
- data/lib/assets/javascripts/socmap_adf/modules/.DS_Store +0 -0
- data/lib/assets/javascripts/socmap_adf/modules/gmap/views/overlay.js.coffee +4 -0
- data/lib/assets/javascripts/socmap_adf/modules/gmap/views/overlay_view.js.coffee +4 -2
- data/lib/assets/javascripts/socmap_adf/modules/overlay/.DS_Store +0 -0
- data/lib/assets/javascripts/socmap_adf/modules/overlay/views/.DS_Store +0 -0
- data/lib/assets/javascripts/socmap_adf/modules/overlay/views/flash_overlay.coffee +3 -1
- data/lib/assets/javascripts/socmap_adf/modules/overlay/views/new/flash_overlay.js.coffee +40 -0
- data/lib/assets/javascripts/socmap_adf/modules/overlay/views/new/overlay.js.coffee +34 -0
- data/lib/assets/javascripts/socmap_adf/modules/overlay/views/polygon_label.js.coffee +1 -1
- data/lib/assets/javascripts/socmap_adf/modules/overlay_push/.DS_Store +0 -0
- data/lib/assets/javascripts/socmap_adf/modules/overlay_push/init.js.coffee +1 -0
- data/lib/socmap_adf/version.rb +1 -1
- data/socmap_adf.gemspec +0 -2
- metadata +7 -4
data/.DS_Store
CHANGED
Binary file
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
# 0.0.8
|
2
|
+
|
3
|
+
### Features & Enhancements
|
4
|
+
* Overlay push module is depricated now and will be removed on version 1.0.0
|
5
|
+
* Add Overlay push logic to Overlay module
|
6
|
+
* Flash overlay on drag hide all overlays
|
7
|
+
|
8
|
+
# 0.0.6
|
9
|
+
|
10
|
+
### Bug fixes
|
11
|
+
* MiniMap getGmap error fixed.
|
12
|
+
|
1
13
|
# 0.0.3
|
2
14
|
|
3
15
|
### Bug fixes
|
data/MIT-LICENSE
CHANGED
data/lib/.DS_Store
CHANGED
Binary file
|
data/lib/assets/.DS_Store
CHANGED
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -95,6 +95,9 @@ class ADF.GMap.Views.Overlay extends google.maps.OverlayView
|
|
95
95
|
@show()
|
96
96
|
@draw()
|
97
97
|
@view.onMarkerMoved(@view.point)
|
98
|
+
|
99
|
+
@markerDragEvent = google.maps.event.addListener @marker, 'drag', (e) =>
|
100
|
+
@view.onMarkerDrag()
|
98
101
|
|
99
102
|
@markerClickEvent = google.maps.event.addDomListener @marker, 'click', (e) =>
|
100
103
|
if @view.clickable
|
@@ -133,6 +136,7 @@ class ADF.GMap.Views.Overlay extends google.maps.OverlayView
|
|
133
136
|
google.maps.event.clearListeners(@getMarker(), "click")
|
134
137
|
google.maps.event.clearListeners(@getMarker(), "mouseover")
|
135
138
|
google.maps.event.clearListeners(@getMarker(), "mouseout")
|
139
|
+
google.maps.event.removeListener(@markerDragEvent)
|
136
140
|
|
137
141
|
# = Show or Hide overlay
|
138
142
|
show: ( animation = false ) ->
|
@@ -71,8 +71,9 @@ class ADF.GMap.Views.OverlayView extends ADF.MVC.Views.Base
|
|
71
71
|
@data
|
72
72
|
|
73
73
|
pushOverlay: () ->
|
74
|
-
|
75
|
-
|
74
|
+
if @map && @point
|
75
|
+
@overlay = new ADF.GMap.Views.Overlay(@map.getGMap(), @)
|
76
|
+
@map.addOverlay(@overlay)
|
76
77
|
|
77
78
|
getMapElement: () ->
|
78
79
|
@map.getMapElement()
|
@@ -142,4 +143,5 @@ class ADF.GMap.Views.OverlayView extends ADF.MVC.Views.Base
|
|
142
143
|
onMarkerMouseOut: () ->
|
143
144
|
onOverlayShowed: () ->
|
144
145
|
onMarkerMoved: (point) ->
|
146
|
+
onMarkerDrag: () ->
|
145
147
|
unbindMap: () ->
|
Binary file
|
Binary file
|
@@ -8,7 +8,6 @@ class ADF.Overlay.Views.FlashOverlay extends ADF.GMap.Views.OverlayView
|
|
8
8
|
|
9
9
|
constructor: (options) ->
|
10
10
|
super(options)
|
11
|
-
@clickable = false
|
12
11
|
@pushOverlay()
|
13
12
|
|
14
13
|
onMarkerMouseOver: () =>
|
@@ -34,6 +33,9 @@ class ADF.Overlay.Views.FlashOverlay extends ADF.GMap.Views.OverlayView
|
|
34
33
|
if @hoverable && @mouseout
|
35
34
|
$(@el).hover(@openOverlayOnHover, @hideOverlayAfterTime)
|
36
35
|
|
36
|
+
onMarkerDrag: () ->
|
37
|
+
@map.hideAllOverlays()
|
38
|
+
|
37
39
|
calculatePosition: () ->
|
38
40
|
arr = @getPositionArray()
|
39
41
|
@setPosition(arr[0], arr[1])
|
@@ -0,0 +1,40 @@
|
|
1
|
+
ADF.Overlay.Views.New ||= {}
|
2
|
+
|
3
|
+
class ADF.Overlay.Views.New.FlashOverlay extends ADF.Overlay.Views.FlashOverlay
|
4
|
+
|
5
|
+
hidden: false
|
6
|
+
draggable: true
|
7
|
+
clickEvent: null
|
8
|
+
|
9
|
+
opened: false
|
10
|
+
clickable: false
|
11
|
+
hoverable: true
|
12
|
+
calibration: [0, -16, -20, 0]
|
13
|
+
mouseout: true
|
14
|
+
|
15
|
+
constructor: (options) ->
|
16
|
+
super(options)
|
17
|
+
@clickableArea = if options.area then options.area else @map.getGMap()
|
18
|
+
@initOverlay()
|
19
|
+
|
20
|
+
initOverlay: () ->
|
21
|
+
if not @overlay
|
22
|
+
if @point && @point.lat() > 0 && @point.lng() > 0
|
23
|
+
@pushOverlay()
|
24
|
+
else
|
25
|
+
@bindMap()
|
26
|
+
else
|
27
|
+
@overlay.view = @
|
28
|
+
@redraw()
|
29
|
+
|
30
|
+
bindMap: () ->
|
31
|
+
@clickEvent = google.maps.event.addListener @clickableArea, 'click', @onClicked unless @clickEvent?
|
32
|
+
|
33
|
+
unbindMap: () ->
|
34
|
+
google.maps.event.removeListener(@clickEvent) if @clickEvent?
|
35
|
+
@clickEvent = null
|
36
|
+
|
37
|
+
onClicked: (e) =>
|
38
|
+
@point = e.latLng
|
39
|
+
@unbindMap()
|
40
|
+
@pushOverlay()
|
@@ -0,0 +1,34 @@
|
|
1
|
+
ADF.Overlay.Views.New ||= {}
|
2
|
+
|
3
|
+
class ADF.Overlay.Views.New.Default extends ADF.GMap.Views.OverlayView
|
4
|
+
|
5
|
+
hidden: false
|
6
|
+
draggable: true
|
7
|
+
clickEvent: null
|
8
|
+
|
9
|
+
constructor: (options) ->
|
10
|
+
super(options)
|
11
|
+
@clickableArea = if options.area then options.area else @map.getGMap()
|
12
|
+
@initOverlay()
|
13
|
+
|
14
|
+
initOverlay: () ->
|
15
|
+
if not @overlay
|
16
|
+
if @point && @point.lat() > 0 && @point.lng() > 0
|
17
|
+
@pushOverlay()
|
18
|
+
else
|
19
|
+
@bindMap()
|
20
|
+
else
|
21
|
+
@overlay.view = @
|
22
|
+
@redraw()
|
23
|
+
|
24
|
+
bindMap: () ->
|
25
|
+
@clickEvent = google.maps.event.addListener @clickableArea, 'click', @onClicked unless @clickEvent?
|
26
|
+
|
27
|
+
unbindMap: () ->
|
28
|
+
google.maps.event.removeListener(@clickEvent) if @clickEvent?
|
29
|
+
@clickEvent = null
|
30
|
+
|
31
|
+
onClicked: (e) =>
|
32
|
+
@point = e.latLng
|
33
|
+
@unbindMap()
|
34
|
+
@pushOverlay()
|
Binary file
|
data/lib/socmap_adf/version.rb
CHANGED
data/socmap_adf.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: socmap_adf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-10-
|
14
|
+
date: 2012-10-19 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: rails
|
@@ -143,8 +143,11 @@ files:
|
|
143
143
|
- lib/assets/javascripts/socmap_adf/modules/overlay/views/.DS_Store
|
144
144
|
- lib/assets/javascripts/socmap_adf/modules/overlay/views/flash_overlay.coffee
|
145
145
|
- lib/assets/javascripts/socmap_adf/modules/overlay/views/main.js.coffee
|
146
|
+
- lib/assets/javascripts/socmap_adf/modules/overlay/views/new/flash_overlay.js.coffee
|
147
|
+
- lib/assets/javascripts/socmap_adf/modules/overlay/views/new/overlay.js.coffee
|
146
148
|
- lib/assets/javascripts/socmap_adf/modules/overlay/views/overlay.js.coffee
|
147
149
|
- lib/assets/javascripts/socmap_adf/modules/overlay/views/polygon_label.js.coffee
|
150
|
+
- lib/assets/javascripts/socmap_adf/modules/overlay_push/.DS_Store
|
148
151
|
- lib/assets/javascripts/socmap_adf/modules/overlay_push/init.js.coffee
|
149
152
|
- lib/assets/javascripts/socmap_adf/modules/overlay_push/templates/colibration.jst.eco
|
150
153
|
- lib/assets/javascripts/socmap_adf/modules/overlay_push/views/flash_new.js.coffee
|
@@ -200,7 +203,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
200
203
|
version: '0'
|
201
204
|
segments:
|
202
205
|
- 0
|
203
|
-
hash:
|
206
|
+
hash: 4199976749007262182
|
204
207
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
205
208
|
none: false
|
206
209
|
requirements:
|
@@ -209,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
209
212
|
version: '0'
|
210
213
|
segments:
|
211
214
|
- 0
|
212
|
-
hash:
|
215
|
+
hash: 4199976749007262182
|
213
216
|
requirements: []
|
214
217
|
rubyforge_project: socmap_adf
|
215
218
|
rubygems_version: 1.8.24
|