c80_map 0.1.0.15 → 0.1.0.16

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: 5c21b38d6f69779edb81051a4470de447878450f
4
- data.tar.gz: 20ba2d4f2ad1c69afa5fe771bab2813c1442ac08
3
+ metadata.gz: d22299dc8d3a58ca88d2affdcdb4ae197c0423f5
4
+ data.tar.gz: 065d046f0e9b487d05d0d4f121fc4287189b4f6a
5
5
  SHA512:
6
- metadata.gz: d13d44acbc3d2f0c5803d1840872768ea45cb49b4fc86badf64e89e731203f3ba26d14d7b1c6d30a7ab3061427db72cf593cab0a374f64628501d5f4a31cc494
7
- data.tar.gz: 00dec2fb04b6cb7abbbb8221571f7224a360b39851badc59151b177cc43ee05f696d44846cbc32ec193a7a1717a395c7afcdbaaf58012d34d142c8dc2b046da5
6
+ metadata.gz: 940fe038d0f4f86baf1cdb58846ac55d8fdc24e9212ed72b82f49ae6f086af10aa35698e07311f219fe09d9c4afa4635efdc565001c600796aaf9ada077e3539
7
+ data.tar.gz: f3c55276a80e32c7463053dba2edcba99f3e3b2856862e7cfd629651c094b2aa1468263941acac1d49fb03391609a8e4fedbea682872d45e706a69e3ed46972b
@@ -8,6 +8,8 @@ function BackToMapButton() {
8
8
  var _cnt = null;
9
9
  var _btn = null;
10
10
 
11
+ var _$building_info = null;
12
+
11
13
  var _onClick = function () {
12
14
  _map.setMode('viewing');
13
15
 
@@ -43,14 +45,39 @@ function BackToMapButton() {
43
45
  _btn = $('<a href="#" id="BackToMapButton">Обратно на карту</a>');
44
46
  _btn.on('click', _onClick);
45
47
  _cnt.append(_btn);
48
+
49
+ _$building_info = $('.building_info');
50
+
46
51
  };
47
52
 
48
53
  _this.show = function () {
54
+
55
+ // хардкод - подгоняем под длину анимации, прописанной в css
56
+ setTimeout(__show, 800);
57
+
58
+
59
+ };
60
+ var __show = function () {
61
+ // фиксируем
62
+ var building_info_top = _$building_info.offset().top;
63
+ var building_info_height = _$building_info.height();
64
+
65
+ // считаем
66
+ var btn_top = building_info_top + building_info_height;
67
+ var btn_left = _$building_info.offset().left;
68
+
69
+ // позиционируем
70
+ _btn.css('top', btn_top + 'px');
71
+ _btn.css('left', btn_left + 'px');
72
+
73
+ // показываем
74
+ _btn.css('opacity','1');
49
75
  _cnt.css('display', 'block');
50
76
  };
51
77
 
52
78
  _this.hide = function () {
53
79
  _cnt.css('display', 'none');
80
+ _btn.css('opacity', '0');
54
81
  }
55
82
 
56
83
  }
@@ -570,7 +570,7 @@ var clog = function () {
570
570
  }, false);
571
571
 
572
572
  self.back_to_map_button_klass = new BackToMapButton();
573
- self.back_to_map_button_klass.init("#container_buttons", self);
573
+ self.back_to_map_button_klass.init("#ui", self);
574
574
 
575
575
  self.save_preloader_klass = new SavePreloader();
576
576
  self.save_preloader_klass.init();
@@ -0,0 +1,16 @@
1
+ #area_order_button {
2
+ width: auto;
3
+ padding: 0 15px;
4
+ position: absolute;
5
+ bottom: 15px;
6
+ right: 15px;
7
+ font-weight: normal;
8
+ border-radius: 2px;
9
+ }
10
+
11
+ // когда входим в здание - кнопка не видна
12
+ div.view_building {
13
+ #area_order_button {
14
+ display: none;
15
+ }
16
+ }
@@ -0,0 +1,28 @@
1
+ #BackToMapButton {
2
+ background-color: #3377A8;
3
+ color: #fff !important;
4
+ display: block;
5
+ font-size: 17px;
6
+ cursor: pointer;
7
+ text-align: center;
8
+ line-height: 50px;
9
+ width: 417px;
10
+ height: 50px;
11
+ z-index: 99999;
12
+ transition: opacity 0.6s ease-out;
13
+ -webkit-transition: all 0.6s ease-out;
14
+ -moz-transition: all 0.6s ease-out;
15
+ -ms-transition: all 0.6s ease-out;
16
+ -o-transition: all 0.6s ease-out;
17
+ position: absolute;
18
+ padding: 0 15px;
19
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
20
+ text-transform: uppercase;
21
+ font-family: FrankRegular, sans-serif;
22
+ font-weight: normal;
23
+
24
+ &:hover {
25
+ background-color: #5FCE4B;
26
+ }
27
+
28
+ }
@@ -58,10 +58,17 @@ module C80Map
58
58
  # har["is_free"] = area.area_representator.is_free?
59
59
  end
60
60
 
61
+ cc = nil
62
+ if b.coords.present?
63
+ cc = b.coords.split(",")
64
+ else
65
+ Rails.logger.debug "[TRACE] <Map_json.update_json> nil! #{b.id}"
66
+ end
67
+
61
68
  ob = {
62
69
  id: b.id,
63
70
  object_type: 'building',
64
- coords: b.coords.split(","),
71
+ coords: cc,
65
72
  building_hash: hbu,
66
73
  # building_hash: {
67
74
  # id: 2,
@@ -30,7 +30,7 @@
30
30
  </div>
31
31
  <div class="container" id="ui">
32
32
  <%= render "layouts/shared/map_row/building_info" %>
33
- <%= render "layouts/shared/map_row/area_order_button" %>
33
+ <%# render "layouts/shared/map_row/area_order_button" %>
34
34
  </div>
35
35
  <div class="container" id="container_buttons">
36
36
  <div class="mzoom_buttons"></div>
@@ -1,3 +1,3 @@
1
1
  module C80Map
2
- VERSION = "0.1.0.15"
2
+ VERSION = "0.1.0.16"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: c80_map
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.15
4
+ version: 0.1.0.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - C80609A
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-07 00:00:00.000000000 Z
11
+ date: 2016-09-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -95,6 +95,8 @@ files:
95
95
  - app/assets/javascripts/view/save_preloader.js
96
96
  - app/assets/stylesheets/c80_map.scss
97
97
  - app/assets/stylesheets/map.scss
98
+ - app/assets/stylesheets/view/buttons/area_order_button.scss
99
+ - app/assets/stylesheets/view/buttons/button_back_to_map.scss
98
100
  - app/assets/stylesheets/view/modal_window.scss
99
101
  - app/assets/stylesheets/view/save_preloader.scss
100
102
  - app/controllers/c80_map/application_controller.rb