socmap_adf 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # 0.0.8
2
2
 
3
+ ### Features & Enhancements
4
+ * MarkerWithLabel now can add and remove label classes
5
+
6
+
7
+ # 0.0.7
8
+
3
9
  ### Features & Enhancements
4
10
  * Overlay push module is depricated now and will be removed on version 1.0.0
5
11
  * Add Overlay push logic to Overlay module
@@ -376,6 +376,24 @@ MarkerLabel_.prototype.setStyles = function () {
376
376
  this.setMandatoryStyles();
377
377
  };
378
378
 
379
+
380
+ MarkerLabel_.prototype.hasClass = function ( className ) {
381
+ return this.labelDiv_.className.match(new RegExp('(\\s|^)'+className+'(\\s|$)'));
382
+ };
383
+
384
+ MarkerLabel_.prototype.addClass = function ( className ) {
385
+ if (!this.hasClass(className)) this.labelDiv_.className += " "+className;
386
+ };
387
+
388
+ MarkerLabel_.prototype.removeClass = function ( className ) {
389
+ if (this.hasClass(className)) {
390
+ var reg = new RegExp('(\\s|^)'+className+'(\\s|$)');
391
+ this.labelDiv_.className=this.labelDiv_.className.replace(reg,' ');
392
+ }
393
+ };
394
+
395
+
396
+
379
397
  /**
380
398
  * Sets the mandatory styles to the DIV representing the label as well as to the
381
399
  * associated event DIV. This includes setting the DIV position, z-index, and visibility.
@@ -1,3 +1,3 @@
1
1
  module SocmapAdf
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
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.7
4
+ version: 0.0.8
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-19 00:00:00.000000000 Z
14
+ date: 2012-10-22 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
@@ -203,7 +203,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
203
203
  version: '0'
204
204
  segments:
205
205
  - 0
206
- hash: 4199976749007262182
206
+ hash: 2721267496652083791
207
207
  required_rubygems_version: !ruby/object:Gem::Requirement
208
208
  none: false
209
209
  requirements:
@@ -212,7 +212,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
212
212
  version: '0'
213
213
  segments:
214
214
  - 0
215
- hash: 4199976749007262182
215
+ hash: 2721267496652083791
216
216
  requirements: []
217
217
  rubyforge_project: socmap_adf
218
218
  rubygems_version: 1.8.24