leaflet-sidebar-rails 0.1.9 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2652c84e0d2561728aa5153c72b8ebad2dee5bb4
|
4
|
+
data.tar.gz: 8238489d8adee22e29ac6bfd5cf15f88026587b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a36ac7550f494cf97212c0c2b324d08564011b7be2f6e92339ab8501b77f04ed9f612c6f640744f249c3f709e6514f5b9596dd8ae7a21bc1921b7c779a6caaf2
|
7
|
+
data.tar.gz: 1cada2eec4c86c0b78b09459bd866ae446c0cb78771c4edf7a8781c38e7fee82b19eced889570936a331d4038461015250d0aa1b8800eea177628e2934b77361
|
@@ -1,6 +1,6 @@
|
|
1
1
|
L.Control.Sidebar = L.Control.extend({
|
2
2
|
|
3
|
-
includes: L.Mixin.Events,
|
3
|
+
includes: (L.Evented.prototype || L.Mixin.Events),
|
4
4
|
|
5
5
|
options: {
|
6
6
|
closeButton: true,
|
@@ -162,7 +162,19 @@ L.Control.Sidebar = L.Control.extend({
|
|
162
162
|
},
|
163
163
|
|
164
164
|
setContent: function (content) {
|
165
|
-
this.getContainer()
|
165
|
+
var container = this.getContainer();
|
166
|
+
|
167
|
+
if (typeof content === 'string') {
|
168
|
+
container.innerHTML = content;
|
169
|
+
} else {
|
170
|
+
// clean current content
|
171
|
+
while (container.firstChild) {
|
172
|
+
container.removeChild(container.firstChild);
|
173
|
+
}
|
174
|
+
|
175
|
+
container.appendChild(content);
|
176
|
+
}
|
177
|
+
|
166
178
|
return this;
|
167
179
|
},
|
168
180
|
|
@@ -182,4 +194,4 @@ L.Control.Sidebar = L.Control.extend({
|
|
182
194
|
|
183
195
|
L.control.sidebar = function (placeholder, options) {
|
184
196
|
return new L.Control.Sidebar(placeholder, options);
|
185
|
-
};
|
197
|
+
};
|
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.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jack Reed
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-10-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -62,7 +62,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
62
62
|
version: '0'
|
63
63
|
requirements: []
|
64
64
|
rubyforge_project:
|
65
|
-
rubygems_version: 2.
|
65
|
+
rubygems_version: 2.6.14
|
66
66
|
signing_key:
|
67
67
|
specification_version: 4
|
68
68
|
summary: Rails plugin for Leaflet-Sidebar plugin
|