c80_push 0.1.0.4 → 0.1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/app/assets/javascripts/c80_push/frontend/c80_push_page_dealers/_map_calc_width.js +16 -0
- data/app/assets/javascripts/c80_push/frontend/c80_push_page_dealers/_map_init.js +8 -2
- data/app/assets/javascripts/c80_push/frontend/c80_push_page_dealers/_map_set_objects.js +6 -1
- data/app/assets/stylesheets/c80_push/c80_push_page_dealers/_layout.scss +1 -1
- data/lib/c80_push/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b99910cffc7868083c04bf3b6bd4789ab8a058d0
|
4
|
+
data.tar.gz: b11f59ce262cb6e685631aa87ad597bbb3b4f1b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2fcbfb1e83cc4999b3873c6f1156499ad493a42e353b091253e57b071b9b02f126dc0da6355e0ec06bc2226ad2f074fef8a7bdd3c5746e29cc5b5827a6b2096d
|
7
|
+
data.tar.gz: 17c6275d97236030be14fbf26657d3ecd60f44738ccca969366e8cfa9a22fdef232f3746bb6cf0f85085e41085419086c3e74f72c79677e1cdd0a96c78e6c4ca
|
data/README.md
CHANGED
@@ -0,0 +1,16 @@
|
|
1
|
+
/* йобаный сафари не дружит с css-calc, фиксим это с помощью js */
|
2
|
+
|
3
|
+
function _map_calc_width() {
|
4
|
+
|
5
|
+
// находим родителя
|
6
|
+
var $parent = $dealers_map_container.parent();
|
7
|
+
console.log($parent);
|
8
|
+
|
9
|
+
// находим левый список
|
10
|
+
var $dealers_list = $parent.find('.dealers_list');
|
11
|
+
var dealers_list_width = $dealers_list.outerWidth(true);
|
12
|
+
|
13
|
+
// считаем ширину
|
14
|
+
var w = $parent.width() - dealers_list_width;
|
15
|
+
$dealers_map_container.css('width', w);
|
16
|
+
}
|
@@ -1,10 +1,16 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
3
|
var dealers_map;
|
4
|
+
var $dealers_map_container;
|
4
5
|
|
5
6
|
$(document).ready(function() {
|
6
7
|
|
7
|
-
|
8
|
+
$dealers_map_container = $('#dealers_map_container');
|
9
|
+
|
10
|
+
if ($dealers_map_container.length) {
|
11
|
+
|
12
|
+
_map_calc_width();
|
13
|
+
|
8
14
|
//noinspection JSUnresolvedVariable
|
9
15
|
ymaps.ready(function() {
|
10
16
|
|
@@ -13,7 +19,7 @@ $(document).ready(function() {
|
|
13
19
|
center: [55, 37],
|
14
20
|
zoom: 10,
|
15
21
|
controls: ['zoomControl']
|
16
|
-
});
|
22
|
+
}, {maxZoom: 20});
|
17
23
|
|
18
24
|
map_set_objects('all');
|
19
25
|
|
@@ -24,5 +24,10 @@ function map_set_objects(region_id) {
|
|
24
24
|
});
|
25
25
|
|
26
26
|
dealers_map.geoObjects.add(c);
|
27
|
-
dealers_map.setBounds(c.getBounds())
|
27
|
+
dealers_map.setBounds(c.getBounds(), {checkZoomRange:true})
|
28
|
+
.then(function() {
|
29
|
+
if(dealers_map.getZoom() > 20) {
|
30
|
+
dealers_map.setZoom(20);
|
31
|
+
}
|
32
|
+
});
|
28
33
|
}
|
data/lib/c80_push/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: c80_push
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- C80609A
|
@@ -56,6 +56,7 @@ files:
|
|
56
56
|
- app/assets/javascripts/c80_push/backend/dealers.js
|
57
57
|
- app/assets/javascripts/c80_push/frontend/c80_push_page_dealers/_dealers_left_list_clicks.js
|
58
58
|
- app/assets/javascripts/c80_push/frontend/c80_push_page_dealers/_dealers_left_list_filter.js
|
59
|
+
- app/assets/javascripts/c80_push/frontend/c80_push_page_dealers/_map_calc_width.js
|
59
60
|
- app/assets/javascripts/c80_push/frontend/c80_push_page_dealers/_map_init.js
|
60
61
|
- app/assets/javascripts/c80_push/frontend/c80_push_page_dealers/_map_set_objects.js
|
61
62
|
- app/assets/javascripts/c80_push/frontend/c80_push_page_dealers/_select_region_init.js
|