leaflet-sidebar-rails 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4bd82e73844a035141ca9a0821883cd76a579b21
4
- data.tar.gz: 9012751021d56cec7a51e003addfb83be61f3b47
3
+ metadata.gz: 6c6256aebac11aed73786c449853aa03ec994033
4
+ data.tar.gz: 8d2ee2f3cf43c07830fc37df442352b2660d5597
5
5
  SHA512:
6
- metadata.gz: d83ceb1449ca31664ed647a3826d873f8e0af49356eba90c8b8c2ee6bb7c3b66a347c973197d22d293d72ec89f5df6cb817cbb1c1a096b66ef3d864ba1e15a73
7
- data.tar.gz: 1f18428f98bb3ac13d88618fc6a656a24d6f007149eb9b31595e96894c3a529ca6504797b236763a3aef0501f690ddb5ce7923f3ddea780a310001cc27e0a5b8
6
+ metadata.gz: 364f841200cb11decda2b3665cc41abebeb0bf806fae3ee81c144e48f11749ca7f9d6f8266533389f2b98edac1030618c1b7c5e1864eb452386ba664d53ca4eb
7
+ data.tar.gz: 5fe13343f87055a1693bf22f34106ef234085efb1e90da0b986b0505b5d35d70ece5ace649c623198feafb75c70ed5712cd2157eb97d6a45ab968d23a1b03f3f
data/.gitignore CHANGED
@@ -1,3 +1,4 @@
1
+ *.gem
1
2
  *.rbc
2
3
  *.sassc
3
4
  .sass-cache
@@ -1,7 +1,7 @@
1
1
  module Leaflet
2
2
  module Sidebar
3
3
  module Rails
4
- VERSION = "0.0.2"
4
+ VERSION = "0.0.3"
5
5
  end
6
6
  end
7
7
  end
@@ -34,6 +34,7 @@ L.Control.Sidebar = L.Control.extend({
34
34
  close.innerHTML = '×';
35
35
  }
36
36
  },
37
+
37
38
  addTo: function (map) {
38
39
  var container = this._container;
39
40
  var content = this._contentContainer;
@@ -45,6 +46,12 @@ L.Control.Sidebar = L.Control.extend({
45
46
  L.DomEvent.on(close, 'click', this.hide, this);
46
47
  }
47
48
 
49
+ L.DomEvent
50
+ .on(container, 'transitionend',
51
+ this._handleTransitionEvent, this)
52
+ .on(container, 'webkitTransitionEnd',
53
+ this._handleTransitionEvent, this);
54
+
48
55
  // Attach sidebar container to controls container
49
56
  var controlContainer = map._controlContainer;
50
57
  controlContainer.insertBefore(container, controlContainer.firstChild);
@@ -87,6 +94,12 @@ L.Control.Sidebar = L.Control.extend({
87
94
  .off(content, 'mousewheel', stop)
88
95
  .off(content, 'MozMousePixelScroll', stop);
89
96
 
97
+ L.DomEvent
98
+ .off(container, 'transitionend',
99
+ this._handleTransitionEvent, this)
100
+ .off(container, 'webkitTransitionEnd',
101
+ this._handleTransitionEvent, this);
102
+
90
103
  if (this._closeButton && this._close) {
91
104
  var close = this._closeButton;
92
105
 
@@ -154,6 +167,11 @@ L.Control.Sidebar = L.Control.extend({
154
167
  } else {
155
168
  return this._container.offsetWidth;
156
169
  }
170
+ },
171
+
172
+ _handleTransitionEvent: function (e) {
173
+ if (e.propertyName == 'left' || e.propertyName == 'right')
174
+ this.fire(this.isVisible() ? 'shown' : 'hidden');
157
175
  }
158
176
  });
159
177
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leaflet-sidebar-rails
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
  - Jack Reed
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-06 00:00:00.000000000 Z
11
+ date: 2014-04-25 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A responsive sidebar for leaflet maps
14
14
  email: