active_frontend 12.4.32 → 13.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (118) hide show
  1. checksums.yaml +4 -4
  2. data/.coveralls.yml +1 -1
  3. data/.gitignore +1 -1
  4. data/.rspec +1 -1
  5. data/.travis.yml +1 -1
  6. data/CODE_OF_CONDUCT.md +1 -1
  7. data/Gemfile +1 -1
  8. data/LICENSE.txt +1 -1
  9. data/README.md +1 -1
  10. data/Rakefile +1 -1
  11. data/active_frontend.gemspec +1 -1
  12. data/app/assets/fonts/dripicons/dripicons-weather.woff +0 -0
  13. data/app/assets/fonts/dripicons/dripicons.woff +0 -0
  14. data/app/assets/images/placeholders/camera-large.png +0 -0
  15. data/app/assets/images/placeholders/camera-small.png +0 -0
  16. data/app/assets/images/placeholders/camera.png +0 -0
  17. data/app/assets/images/placeholders/picture-large.png +0 -0
  18. data/app/assets/images/placeholders/picture-small.png +0 -0
  19. data/app/assets/images/placeholders/picture.png +0 -0
  20. data/app/assets/images/placeholders/store-large.png +0 -0
  21. data/app/assets/images/placeholders/store-small.png +0 -0
  22. data/app/assets/images/placeholders/store.png +0 -0
  23. data/app/assets/images/placeholders/user-large.png +0 -0
  24. data/app/assets/images/placeholders/user-small.png +0 -0
  25. data/app/assets/images/placeholders/user.png +0 -0
  26. data/app/helpers/active_frontend_helper.rb +2 -2
  27. data/lib/active_frontend/version.rb +2 -2
  28. data/lib/active_frontend.rb +1 -1
  29. data/lib/generators/active_frontend/install_generator.rb +1 -1
  30. data/lib/generators/active_frontend/templates/install.js +1 -1
  31. data/lib/generators/active_frontend/templates/install.scss +1 -1
  32. data/vendor/assets/javascripts/_affix.js +1 -1
  33. data/vendor/assets/javascripts/_alert.js +1 -1
  34. data/vendor/assets/javascripts/_animation.js +1 -1
  35. data/vendor/assets/javascripts/_button.js +1 -1
  36. data/vendor/assets/javascripts/_carousel.js +1 -1
  37. data/vendor/assets/javascripts/_chart.js +8 -8
  38. data/vendor/assets/javascripts/_collapse.js +1 -1
  39. data/vendor/assets/javascripts/_color_picker.js +1 -1
  40. data/vendor/assets/javascripts/_date_picker.js +1 -1
  41. data/vendor/assets/javascripts/_dropdown.js +1 -1
  42. data/vendor/assets/javascripts/_file_input.js +1 -1
  43. data/vendor/assets/javascripts/_hoverdown.js +1 -1
  44. data/vendor/assets/javascripts/_inputmask.js +1 -1
  45. data/vendor/assets/javascripts/_loader.js +1 -1
  46. data/vendor/assets/javascripts/_map.js +149 -10
  47. data/vendor/assets/javascripts/_modal.js +1 -1
  48. data/vendor/assets/javascripts/_popover.js +1 -1
  49. data/vendor/assets/javascripts/_scrollspy.js +1 -1
  50. data/vendor/assets/javascripts/_slider.js +1 -1
  51. data/vendor/assets/javascripts/_sort.js +1 -1
  52. data/vendor/assets/javascripts/_swoggle.js +1 -1
  53. data/vendor/assets/javascripts/_tab.js +1 -1
  54. data/vendor/assets/javascripts/_tablespy.js +1 -1
  55. data/vendor/assets/javascripts/_time_ago.js +1 -1
  56. data/vendor/assets/javascripts/_time_picker.js +1 -1
  57. data/vendor/assets/javascripts/_tooltip.js +1 -1
  58. data/vendor/assets/javascripts/_transition.js +1 -1
  59. data/vendor/assets/javascripts/_typeahead.js +1 -1
  60. data/vendor/assets/javascripts/active_frontend.js +1 -1
  61. data/vendor/assets/stylesheets/_ad.scss +2 -2
  62. data/vendor/assets/stylesheets/_affix.scss +1 -1
  63. data/vendor/assets/stylesheets/_alert.scss +3 -16
  64. data/vendor/assets/stylesheets/_animation.scss +1 -1
  65. data/vendor/assets/stylesheets/_breadcrumb.scss +3 -18
  66. data/vendor/assets/stylesheets/_button.scss +33 -39
  67. data/vendor/assets/stylesheets/_canvas.scss +1 -1
  68. data/vendor/assets/stylesheets/_carousel.scss +2 -2
  69. data/vendor/assets/stylesheets/_chart.scss +1 -1
  70. data/vendor/assets/stylesheets/_code.scss +3 -3
  71. data/vendor/assets/stylesheets/_collapse.scss +2 -2
  72. data/vendor/assets/stylesheets/_color.scss +2 -2
  73. data/vendor/assets/stylesheets/_colorpicker.scss +20 -5
  74. data/vendor/assets/stylesheets/_datepicker.scss +7 -5
  75. data/vendor/assets/stylesheets/_dropdown.scss +12 -9
  76. data/vendor/assets/stylesheets/_footer.scss +4 -5
  77. data/vendor/assets/stylesheets/_form.scss +51 -50
  78. data/vendor/assets/stylesheets/_grid.scss +1 -1
  79. data/vendor/assets/stylesheets/_header.scss +53 -497
  80. data/vendor/assets/stylesheets/_icon.scss +321 -1489
  81. data/vendor/assets/stylesheets/_image.scss +1 -1
  82. data/vendor/assets/stylesheets/_label_and_badge.scss +1 -1
  83. data/vendor/assets/stylesheets/_link.scss +41 -2
  84. data/vendor/assets/stylesheets/_list.scss +3 -3
  85. data/vendor/assets/stylesheets/_loader.scss +1 -1
  86. data/vendor/assets/stylesheets/_map.scss +1 -1
  87. data/vendor/assets/stylesheets/_missive.scss +1 -1
  88. data/vendor/assets/stylesheets/_mixin.scss +1 -1
  89. data/vendor/assets/stylesheets/_modal.scss +1 -1
  90. data/vendor/assets/stylesheets/_nav_and_tab.scss +1 -1
  91. data/vendor/assets/stylesheets/_navbar.scss +8 -16
  92. data/vendor/assets/stylesheets/_pagination.scss +9 -5
  93. data/vendor/assets/stylesheets/_panel.scss +4 -4
  94. data/vendor/assets/stylesheets/_placeholder.scss +3 -4
  95. data/vendor/assets/stylesheets/_popover.scss +2 -2
  96. data/vendor/assets/stylesheets/_progress.scss +1 -1
  97. data/vendor/assets/stylesheets/_reset.scss +6 -4
  98. data/vendor/assets/stylesheets/_sidebar.scss +9 -141
  99. data/vendor/assets/stylesheets/_slider.scss +9 -9
  100. data/vendor/assets/stylesheets/_spinner.scss +6 -4
  101. data/vendor/assets/stylesheets/_subheader.scss +19 -180
  102. data/vendor/assets/stylesheets/_swoggle.scss +3 -3
  103. data/vendor/assets/stylesheets/_table.scss +20 -11
  104. data/vendor/assets/stylesheets/_timepicker.scss +7 -10
  105. data/vendor/assets/stylesheets/_toolbar.scss +8 -21
  106. data/vendor/assets/stylesheets/_tooltip.scss +4 -3
  107. data/vendor/assets/stylesheets/_transition.scss +1 -1
  108. data/vendor/assets/stylesheets/_trunk.scss +16 -24
  109. data/vendor/assets/stylesheets/_typeahead.scss +2 -7
  110. data/vendor/assets/stylesheets/_typography.scss +1 -1
  111. data/vendor/assets/stylesheets/_variable.scss +1 -1
  112. data/vendor/assets/stylesheets/active_frontend.scss +1 -1
  113. metadata +15 -8
  114. data/app/assets/fonts/ionicons/ionicons.eot +0 -0
  115. data/app/assets/fonts/ionicons/ionicons.svg +0 -2232
  116. data/app/assets/fonts/ionicons/ionicons.ttf +0 -0
  117. data/app/assets/fonts/ionicons/ionicons.woff +0 -0
  118. data/app/assets/images/placeholders/person.png +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aefa7cad69fbf72d3013ede7b67b96c37276aaf2
4
- data.tar.gz: ef9075c9912eb8cf992fb03a120b7ed1125f35fb
3
+ metadata.gz: 395efb468d9b69cd0a9dc022d46d1e35510eb1cf
4
+ data.tar.gz: b1c9827c6dc0b171bdd27dcddeefa062472a8ab7
5
5
  SHA512:
6
- metadata.gz: b43d4117ce3e5d8f5cd1096e677e3811c96460ad58ed0e9478c694afddb6f985badb13ba965f7de8c926fd6be76b5e82355aa455bebeb9d73c630009bc7604ba
7
- data.tar.gz: 379c0a37665d5bbf1117af97494d51110fa6dcf1d39083a0137a6022da26741bb1927b427590168c768fb0e2c38d78380e3788ddc51053e1aa209a9c388e5922
6
+ metadata.gz: a985a9b53edabca4eed8a2db63c865112fc27970b38b132cdb02349f698422414d36eac4903e4cc49e446a5abbd5274750f396cb4e44f1335bb22dfd26487c9f
7
+ data.tar.gz: 8425408dd38fad6d474020fa0aae4d4abc1b7de51274bfe9e203694fbff8412d4f3ffe37195a95eb9caf59c648e30204f7211f86cce4f317fa79878137df70f7
data/.coveralls.yml CHANGED
@@ -1 +1 @@
1
- service_name: travis-ci
1
+ service_name: travis-ci
data/.gitignore CHANGED
@@ -6,4 +6,4 @@
6
6
  /doc/
7
7
  /pkg/
8
8
  /spec/reports/
9
- /tmp/
9
+ /tmp/
data/.rspec CHANGED
@@ -1,4 +1,4 @@
1
1
  --backtrace
2
2
  --color
3
3
  --format progress
4
- --order random
4
+ --order random
data/.travis.yml CHANGED
@@ -10,4 +10,4 @@ notifications:
10
10
  on_success: never
11
11
  rvm:
12
12
  - ruby-head
13
- script: 'bundle exec rake'
13
+ script: 'bundle exec rake'
data/CODE_OF_CONDUCT.md CHANGED
@@ -10,4 +10,4 @@ Project maintainers have the right and responsibility to remove, edit, or reject
10
10
 
11
11
  Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
12
 
13
- This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
13
+ This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in active_frontend.gemspec
4
- gemspec
4
+ gemspec
data/LICENSE.txt CHANGED
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -129,4 +129,4 @@ Add the JS files you want to include:
129
129
  2. Create your feature branch (`git checkout -b my-new-feature`)
130
130
  3. Commit your changes (`git commit -am 'Add some feature'`)
131
131
  4. Push to the branch (`git push origin my-new-feature`)
132
- 5. Create a new Pull Request
132
+ 5. Create a new Pull Request
data/Rakefile CHANGED
@@ -1,3 +1,3 @@
1
1
  require "bundler/gem_tasks"
2
2
 
3
- task default: :spec
3
+ task default: :spec
@@ -26,4 +26,4 @@ Gem::Specification.new do |spec|
26
26
  spec.add_development_dependency "rake"
27
27
  spec.add_development_dependency "rspec", "~> 3.4.0"
28
28
  spec.add_development_dependency "generator_spec"
29
- end
29
+ end
@@ -27,7 +27,7 @@ module ActiveFrontendHelper
27
27
  pink: { rgba: "rgba(255,0,102,#{opacity})", hex: "#FF0066" },
28
28
  red: { rgba: "rgba(240,35,17,#{opacity})", hex: "#F02311" },
29
29
  orange: { rgba: "rgba(248,122,9,#{opacity})", hex: "#F87A09" },
30
- yellow: { rgba: "rgba(255,209,0,#{opacity})", hex: "#FFD100" },
30
+ yellow: { rgba: "rgba(245,200,0,#{opacity})", hex: "#F5C800" },
31
31
  lime_alt: { rgba: "rgba(181,228,78,#{opacity})", hex: "#B5E44E" },
32
32
  green_alt: { rgba: "rgba(100,194,28,#{opacity})", hex: "#64C21C" },
33
33
  teal_alt: { rgba: "rgba(120,206,205,#{opacity})", hex: "#78CECD" },
@@ -41,4 +41,4 @@ module ActiveFrontendHelper
41
41
  }
42
42
  end
43
43
 
44
- end
44
+ end
@@ -1,3 +1,3 @@
1
1
  module ActiveFrontend
2
- VERSION = "12.4.32"
3
- end
2
+ VERSION = "13.0.0"
3
+ end
@@ -6,4 +6,4 @@ require "generators/active_frontend/install_generator"
6
6
  module ActiveFrontend
7
7
  class Engine < ::Rails::Engine
8
8
  end
9
- end
9
+ end
@@ -13,4 +13,4 @@ module ActiveFrontend
13
13
  end
14
14
 
15
15
  end
16
- end
16
+ end
@@ -31,4 +31,4 @@
31
31
  //= require _tooltip
32
32
  //= require _popover
33
33
  //= require _transition
34
- //= require _typeahead
34
+ //= require _typeahead
@@ -58,4 +58,4 @@
58
58
  @import 'transition';
59
59
  @import 'trunk';
60
60
  @import 'typography';
61
- @import 'typeahead';
61
+ @import 'typeahead';
@@ -150,4 +150,4 @@
150
150
  })
151
151
  })
152
152
 
153
- }(jQuery);
153
+ }(jQuery);
@@ -82,4 +82,4 @@
82
82
 
83
83
  $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
84
84
 
85
- }(jQuery);
85
+ }(jQuery);
@@ -100,4 +100,4 @@
100
100
  }
101
101
  });
102
102
 
103
- }(jQuery);
103
+ }(jQuery);
@@ -104,4 +104,4 @@
104
104
  $(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
105
105
  })
106
106
 
107
- }(jQuery);
107
+ }(jQuery);
@@ -225,4 +225,4 @@
225
225
  })
226
226
  })
227
227
 
228
- }(jQuery);
228
+ }(jQuery);
@@ -85,7 +85,7 @@
85
85
  scaleFontFamily: "'Gotham Round', 'Gotham', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
86
86
 
87
87
  // Number - Scale label font size in pixels
88
- scaleFontSize: 11,
88
+ scaleFontSize: 13,
89
89
 
90
90
  // String - Scale label font weight style
91
91
  scaleFontStyle: "bold",
@@ -115,7 +115,7 @@
115
115
  tooltipFontFamily: "'Gotham Round', 'Gotham', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
116
116
 
117
117
  // Number - Tooltip label font size in pixels
118
- tooltipFontSize: 11,
118
+ tooltipFontSize: 12,
119
119
 
120
120
  // String - Tooltip font weight style
121
121
  tooltipFontStyle: "bold",
@@ -127,7 +127,7 @@
127
127
  tooltipTitleFontFamily: "'Gotham Round', 'Gotham', 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",
128
128
 
129
129
  // Number - Tooltip title font size in pixels
130
- tooltipTitleFontSize: 11,
130
+ tooltipTitleFontSize: 12,
131
131
 
132
132
  // String - Tooltip title font weight style
133
133
  tooltipTitleFontStyle: "bold",
@@ -139,7 +139,7 @@
139
139
  tooltipTitleTemplate: "<%= label %>",
140
140
 
141
141
  // Number - pixel width of padding around tooltip text
142
- tooltipYPadding: 8,
142
+ tooltipYPadding: 10,
143
143
 
144
144
  // Number - pixel width of padding around tooltip text
145
145
  tooltipXPadding: 10,
@@ -173,7 +173,7 @@
173
173
  "rgba(255,0,102,1)",
174
174
  "rgba(240,35,17,1)",
175
175
  "rgba(248,122,9,1)",
176
- "rgba(255,209,0,1)",
176
+ "rgba(245,200,0,1)",
177
177
  "rgba(50,56,64,1)",
178
178
  "rgba(126,137,150,1)"
179
179
  ],
@@ -189,7 +189,7 @@
189
189
  "rgba(255,0,102,0.1)",
190
190
  "rgba(240,35,17,0.1)",
191
191
  "rgba(248,122,9,0.1)",
192
- "rgba(255,209,0,0.1)",
192
+ "rgba(245,200,0,0.1)",
193
193
  "rgba(50,56,64,0.1)",
194
194
  "rgba(126,137,150,0.1)"
195
195
  ],
@@ -3435,7 +3435,7 @@
3435
3435
  pointLabelFontStyle : "bold",
3436
3436
 
3437
3437
  //Number - Point label font size in pixels
3438
- pointLabelFontSize : 11,
3438
+ pointLabelFontSize : 13,
3439
3439
 
3440
3440
  //String - Point label font colour
3441
3441
  pointLabelFontColor : "rgba(36,40,46,1)",
@@ -3739,4 +3739,4 @@
3739
3739
 
3740
3740
  });
3741
3741
 
3742
- }).call(this);
3742
+ }).call(this);
@@ -199,4 +199,4 @@
199
199
  Plugin.call($target, option)
200
200
  })
201
201
 
202
- }(jQuery);
202
+ }(jQuery);
@@ -106,4 +106,4 @@
106
106
 
107
107
  $.fn.colorpicker.Constructor = ColorPicker;
108
108
 
109
- })(jQuery, window, document);
109
+ })(jQuery, window, document);
@@ -1646,4 +1646,4 @@
1646
1646
  $('[data-provide="datepicker-inline"]').datepicker();
1647
1647
  });
1648
1648
 
1649
- }(window.jQuery));
1649
+ }(window.jQuery));
@@ -153,4 +153,4 @@
153
153
  .on('keydown.bs.dropdown.data-api', toggle, Dropdown.prototype.keydown)
154
154
  .on('keydown.bs.dropdown.data-api', '.dropdown-menu', Dropdown.prototype.keydown)
155
155
 
156
- }(jQuery);
156
+ }(jQuery);
@@ -68,4 +68,4 @@ function formFileGroup() { "use strict";
68
68
  $('.form-file-group-input').change(function(){
69
69
  $('.form-file-group-text').val($('.form-file-group-input').val());
70
70
  });
71
- };
71
+ };
@@ -106,4 +106,4 @@
106
106
  // apply dropdownHover to all elements with the data-hover="dropdown" attribute
107
107
  $('[data-hover="dropdown"]').dropdownHover();
108
108
  });
109
- })(jQuery, this);
109
+ })(jQuery, this);
@@ -338,4 +338,4 @@
338
338
  $this.inputmask($this.data())
339
339
  })
340
340
 
341
- }(window.jQuery);
341
+ }(window.jQuery);
@@ -358,4 +358,4 @@ $(function() {
358
358
  $(document).on('page:restore', function() { Loader.remove(); });
359
359
  $(document).on('pjax:send', function() { Loader.start(); });
360
360
  $(document).on('pjax:complete', function() { Loader.done(); });
361
- });
361
+ });
@@ -154,7 +154,16 @@ var GMaps = (function(global) {
154
154
  "use strict";
155
155
 
156
156
  var doc = document;
157
-
157
+ /**
158
+ * Creates a new GMaps instance, including a Google Maps map.
159
+ * @class GMaps
160
+ * @constructs
161
+ * @param {object} options - `options` accepts all the [MapOptions](https://developers.google.com/maps/documentation/javascript/reference#MapOptions) and [events](https://developers.google.com/maps/documentation/javascript/reference#Map) listed in the Google Maps API. Also accepts:
162
+ * * `lat` (number): Latitude of the map's center
163
+ * * `lng` (number): Longitude of the map's center
164
+ * * `el` (string or HTMLElement): container where the map will be rendered
165
+ * * `markerClusterer` (function): A function to create a marker cluster. You can use MarkerClusterer or MarkerClustererPlus.
166
+ */
158
167
  var GMaps = function(options) {
159
168
 
160
169
  if (!(typeof window.google === 'object' && window.google.maps)) {
@@ -220,6 +229,11 @@ var GMaps = (function(global) {
220
229
 
221
230
  if (typeof(options.el) === 'string' || typeof(options.div) === 'string') {
222
231
  if (identifier.indexOf("#") > -1) {
232
+ /**
233
+ * Container element
234
+ *
235
+ * @type {HTMLElement}
236
+ */
223
237
  this.el = getElementById(identifier, options.context);
224
238
  } else {
225
239
  this.el = getElementsByClassName.apply(this, [identifier, options.context]);
@@ -235,16 +249,61 @@ var GMaps = (function(global) {
235
249
  window.context_menu = window.context_menu || {};
236
250
  window.context_menu[self.el.id] = {};
237
251
 
252
+ /**
253
+ * Collection of custom controls in the map UI
254
+ *
255
+ * @type {array}
256
+ */
238
257
  this.controls = [];
258
+ /**
259
+ * Collection of map's overlays
260
+ *
261
+ * @type {array}
262
+ */
239
263
  this.overlays = [];
240
- this.layers = []; // array with kml/georss and fusiontables layers, can be as many
241
- this.singleLayers = {}; // object with the other layers, only one per layer
264
+ /**
265
+ * Collection of KML/GeoRSS and FusionTable layers
266
+ *
267
+ * @type {array}
268
+ */
269
+ this.layers = [];
270
+ /**
271
+ * Collection of data layers (See {@link GMaps#addLayer})
272
+ *
273
+ * @type {object}
274
+ */
275
+ this.singleLayers = {};
276
+ /**
277
+ * Collection of map's markers
278
+ *
279
+ * @type {array}
280
+ */
242
281
  this.markers = [];
282
+ /**
283
+ * Collection of map's lines
284
+ *
285
+ * @type {array}
286
+ */
243
287
  this.polylines = [];
288
+ /**
289
+ * Collection of map's routes requested by {@link GMaps#getRoutes}, {@link GMaps#renderRoute}, {@link GMaps#drawRoute}, {@link GMaps#travelRoute} or {@link GMaps#drawSteppedRoute}
290
+ *
291
+ * @type {array}
292
+ */
244
293
  this.routes = [];
294
+ /**
295
+ * Collection of map's polygons
296
+ *
297
+ * @type {array}
298
+ */
245
299
  this.polygons = [];
246
300
  this.infoWindow = null;
247
301
  this.overlay_el = null;
302
+ /**
303
+ * Current map's zoom
304
+ *
305
+ * @type {number}
306
+ */
248
307
  this.zoom = options.zoom;
249
308
  this.registered_events = {};
250
309
 
@@ -271,9 +330,19 @@ var GMaps = (function(global) {
271
330
  delete map_options[events_that_doesnt_hide_context_menu[i]];
272
331
  }
273
332
 
333
+ /**
334
+ * Google Maps map instance
335
+ *
336
+ * @type {google.maps.Map}
337
+ */
274
338
  this.map = new google.maps.Map(this.el, map_options);
275
339
 
276
340
  if (markerClustererFunction) {
341
+ /**
342
+ * Marker Clusterer instance
343
+ *
344
+ * @type {object}
345
+ */
277
346
  this.markerClusterer = markerClustererFunction.apply(this, [this.map]);
278
347
  }
279
348
 
@@ -350,6 +419,16 @@ var GMaps = (function(global) {
350
419
  }, 0);
351
420
  };
352
421
 
422
+ /**
423
+ * Add a context menu for a map or a marker.
424
+ *
425
+ * @param {object} options - The `options` object should contain:
426
+ * * `control` (string): Kind of control the context menu will be attached. Can be "map" or "marker".
427
+ * * `options` (array): A collection of context menu items:
428
+ * * `title` (string): Item's title shown in the context menu.
429
+ * * `name` (string): Item's identifier.
430
+ * * `action` (function): Function triggered after selecting the context menu item.
431
+ */
353
432
  this.setContextMenu = function(options) {
354
433
  window.context_menu[self.el.id][options.control] = {};
355
434
 
@@ -391,6 +470,9 @@ var GMaps = (function(global) {
391
470
  }, false);
392
471
  };
393
472
 
473
+ /**
474
+ * Hide the current context menu
475
+ */
394
476
  this.hideContextMenu = function() {
395
477
  var context_menu_element = getElementById('gmaps_context_menu');
396
478
 
@@ -440,10 +522,16 @@ var GMaps = (function(global) {
440
522
  }
441
523
  });
442
524
 
525
+ /**
526
+ * Trigger a `resize` event, useful if you need to repaint the current map (for changes in the viewport or display / hide actions).
527
+ */
443
528
  this.refresh = function() {
444
529
  google.maps.event.trigger(this.map, 'resize');
445
530
  };
446
531
 
532
+ /**
533
+ * Adjust the map zoom to include all the markers added in the map.
534
+ */
447
535
  this.fitZoom = function() {
448
536
  var latLngs = [],
449
537
  markers_length = this.markers.length,
@@ -458,6 +546,11 @@ var GMaps = (function(global) {
458
546
  this.fitLatLngBounds(latLngs);
459
547
  };
460
548
 
549
+ /**
550
+ * Adjust the map zoom to include all the coordinates in the `latLngs` array.
551
+ *
552
+ * @param {array} latLngs - Collection of `google.maps.LatLng` objects.
553
+ */
461
554
  this.fitLatLngBounds = function(latLngs) {
462
555
  var total = latLngs.length,
463
556
  bounds = new google.maps.LatLngBounds(),
@@ -470,6 +563,13 @@ var GMaps = (function(global) {
470
563
  this.map.fitBounds(bounds);
471
564
  };
472
565
 
566
+ /**
567
+ * Center the map using the `lat` and `lng` coordinates.
568
+ *
569
+ * @param {number} lat - Latitude of the coordinate.
570
+ * @param {number} lng - Longitude of the coordinate.
571
+ * @param {function} [callback] - Callback that will be executed after the map is centered.
572
+ */
473
573
  this.setCenter = function(lat, lng, callback) {
474
574
  this.map.panTo(new google.maps.LatLng(lat, lng));
475
575
 
@@ -478,10 +578,20 @@ var GMaps = (function(global) {
478
578
  }
479
579
  };
480
580
 
581
+ /**
582
+ * Return the HTML element container of the map.
583
+ *
584
+ * @returns {HTMLElement} the element container.
585
+ */
481
586
  this.getElement = function() {
482
587
  return this.el;
483
588
  };
484
589
 
590
+ /**
591
+ * Increase the map's zoom.
592
+ *
593
+ * @param {number} [magnitude] - The number of times the map will be zoomed in.
594
+ */
485
595
  this.zoomIn = function(value) {
486
596
  value = value || 1;
487
597
 
@@ -489,6 +599,11 @@ var GMaps = (function(global) {
489
599
  this.map.setZoom(this.zoom);
490
600
  };
491
601
 
602
+ /**
603
+ * Decrease the map's zoom.
604
+ *
605
+ * @param {number} [magnitude] - The number of times the map will be zoomed out.
606
+ */
492
607
  this.zoomOut = function(value) {
493
608
  value = value || 1;
494
609
 
@@ -570,6 +685,19 @@ GMaps.prototype.createControl = function(options) {
570
685
  return control;
571
686
  };
572
687
 
688
+ /**
689
+ * Add a custom control to the map UI.
690
+ *
691
+ * @param {object} options - The `options` object should contain:
692
+ * * `style` (object): The keys and values of this object should be valid CSS properties and values.
693
+ * * `id` (string): The HTML id for the custom control.
694
+ * * `classes` (string): A string containing all the HTML classes for the custom control.
695
+ * * `content` (string or HTML element): The content of the custom control.
696
+ * * `position` (string): Any valid [`google.maps.ControlPosition`](https://developers.google.com/maps/documentation/javascript/controls#ControlPositioning) value, in lower or upper case.
697
+ * * `events` (object): The keys of this object should be valid DOM events. The values should be functions.
698
+ * * `disableDefaultStyles` (boolean): If false, removes the default styles for the controls like font (family and size), and box shadow.
699
+ * @returns {HTMLElement}
700
+ */
573
701
  GMaps.prototype.addControl = function(options) {
574
702
  var control = this.createControl(options);
575
703
 
@@ -579,6 +707,12 @@ GMaps.prototype.addControl = function(options) {
579
707
  return control;
580
708
  };
581
709
 
710
+ /**
711
+ * Remove a control from the map. `control` should be a control returned by `addControl()`.
712
+ *
713
+ * @param {HTMLElement} control - One of the controls returned by `addControl()`.
714
+ * @returns {HTMLElement} the removed control.
715
+ */
582
716
  GMaps.prototype.removeControl = function(control) {
583
717
  var position = null,
584
718
  i;
@@ -780,13 +914,13 @@ GMaps.prototype.removeMarkers = function (collection) {
780
914
  var marker = this.markers[i];
781
915
  marker.setMap(null);
782
916
 
783
- if(this.markerClusterer) {
784
- this.markerClusterer.removeMarker(marker);
785
- }
786
-
787
917
  GMaps.fire('marker_removed', marker, this);
788
918
  }
789
919
 
920
+ if(this.markerClusterer && this.markerClusterer.clearMarkers) {
921
+ this.markerClusterer.clearMarkers();
922
+ }
923
+
790
924
  this.markers = new_markers;
791
925
  }
792
926
  else {
@@ -1358,18 +1492,19 @@ GMaps.prototype.getRoutes = function(options) {
1358
1492
  delete request_options.error;
1359
1493
 
1360
1494
  var self = this,
1495
+ routes = [],
1361
1496
  service = new google.maps.DirectionsService();
1362
1497
 
1363
1498
  service.route(request_options, function(result, status) {
1364
1499
  if (status === google.maps.DirectionsStatus.OK) {
1365
1500
  for (var r in result.routes) {
1366
1501
  if (result.routes.hasOwnProperty(r)) {
1367
- self.routes.push(result.routes[r]);
1502
+ routes.push(result.routes[r]);
1368
1503
  }
1369
1504
  }
1370
1505
 
1371
1506
  if (options.callback) {
1372
- options.callback(self.routes, result, status);
1507
+ options.callback(routes, result, status);
1373
1508
  }
1374
1509
  }
1375
1510
  else {
@@ -2205,6 +2340,10 @@ if (typeof window.google === 'object' && window.google.maps) {
2205
2340
  };
2206
2341
  }
2207
2342
 
2343
+ google.maps.Rectangle.prototype.containsLatLng = function(latLng) {
2344
+ return this.getBounds().contains(latLng);
2345
+ };
2346
+
2208
2347
  google.maps.LatLngBounds.prototype.containsLatLng = function(latLng) {
2209
2348
  return this.contains(latLng);
2210
2349
  };
@@ -2259,4 +2398,4 @@ if (!Array.prototype.indexOf) {
2259
2398
  }
2260
2399
 
2261
2400
  return GMaps;
2262
- }));
2401
+ }));
@@ -325,4 +325,4 @@
325
325
  Plugin.call($target, option, this)
326
326
  })
327
327
 
328
- }(jQuery);
328
+ }(jQuery);
@@ -96,4 +96,4 @@
96
96
  return this
97
97
  }
98
98
 
99
- }(jQuery);
99
+ }(jQuery);
@@ -160,4 +160,4 @@
160
160
  })
161
161
  })
162
162
 
163
- }(jQuery);
163
+ }(jQuery);
@@ -1569,4 +1569,4 @@
1569
1569
  })( $ );
1570
1570
 
1571
1571
  return Slider;
1572
- }));
1572
+ }));