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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: '08e3a16af5122af18b81fab713f1ded9452851df'
4
- data.tar.gz: d4c10df2920366bb0fee58263808974f7529b4c0
3
+ metadata.gz: b99910cffc7868083c04bf3b6bd4789ab8a058d0
4
+ data.tar.gz: b11f59ce262cb6e685631aa87ad597bbb3b4f1b4
5
5
  SHA512:
6
- metadata.gz: 320f5a1087a6145065f9db2b8d1f167bf9ac69fbfe9e32638a7566c890b8db1078a6f8097034f925ae574b17fec828c7640b8090eb576964ff801eb7c98321e6
7
- data.tar.gz: e9034a29367f24a2a11223c39b6ff225e09ff20141bccbc4b64fb3f7357b913bf8adc52394eaf952308a9148c008874e50d0296a1e3a293320679fcafe1d8235
6
+ metadata.gz: 2fcbfb1e83cc4999b3873c6f1156499ad493a42e353b091253e57b071b9b02f126dc0da6355e0ec06bc2226ad2f074fef8a7bdd3c5746e29cc5b5827a6b2096d
7
+ data.tar.gz: 17c6275d97236030be14fbf26657d3ecd60f44738ccca969366e8cfa9a22fdef232f3746bb6cf0f85085e41085419086c3e74f72c79677e1cdd0a96c78e6c4ca
data/README.md CHANGED
@@ -125,6 +125,8 @@ body.admin_dealers {
125
125
 
126
126
  - [X] seeds
127
127
 
128
+ * [ ] BUG: safari не дружит с `css calc`: найти другое решение. См. стили.
129
+
128
130
  # Процесс разработки JS функционала
129
131
 
130
132
  Теперь пора заняться js.
@@ -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
- if ($('#dealers_map_container').length) {
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
  }
@@ -31,7 +31,7 @@ div.c80_push_page_dealers {
31
31
  }
32
32
 
33
33
  div#dealers_map_container {
34
- width: calc(100% - 320px);
34
+ /* width: _map_calc_width.js */
35
35
  height: 600px;
36
36
  }
37
37
 
@@ -1,3 +1,3 @@
1
1
  module C80Push
2
- VERSION = '0.1.0.4'
2
+ VERSION = '0.1.0.5'
3
3
  end
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
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