leaflet-sidebar-rails 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 +4 -4
- data/.gitignore +1 -0
- data/lib/leaflet-sidebar-rails/version.rb +1 -1
- data/vendor/assets/javascripts/L.Control.Sidebar.js +18 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6c6256aebac11aed73786c449853aa03ec994033
|
4
|
+
data.tar.gz: 8d2ee2f3cf43c07830fc37df442352b2660d5597
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 364f841200cb11decda2b3665cc41abebeb0bf806fae3ee81c144e48f11749ca7f9d6f8266533389f2b98edac1030618c1b7c5e1864eb452386ba664d53ca4eb
|
7
|
+
data.tar.gz: 5fe13343f87055a1693bf22f34106ef234085efb1e90da0b986b0505b5d35d70ece5ace649c623198feafb75c70ed5712cd2157eb97d6a45ab968d23a1b03f3f
|
data/.gitignore
CHANGED
@@ -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.
|
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-
|
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:
|