c80_map_floors 0.1.0.20 → 0.1.0.21
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a17a5fbb3602490d393889c404ff4f313310453
|
4
|
+
data.tar.gz: 7d1107a8aca32d330db425f07eff5f758f9f67d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b65b359a6467ded738329ee15579b5603241e24aa3d71216636df1810c498ac427f95a3936171ad4e8904f1c86a78f8b94fda4efdb8b1a481a9f8af4d83ff96c
|
7
|
+
data.tar.gz: c205ef48c9d29ee610783f9915c86932456ffdd0793439fc01a21aeb8983e3933bf547dfe9e7db0719df12838131f14d9396039d9d2f6a9681114455ac2558e9
|
@@ -27,8 +27,8 @@ function Area() {
|
|
27
27
|
|
28
28
|
_this.init = function (options, parent_floor_json, pself) {
|
29
29
|
|
30
|
-
console.log("<Area.init> options: ");
|
31
|
-
console.log(options);
|
30
|
+
//console.log("<Area.init> options: ");
|
31
|
+
//console.log(options);
|
32
32
|
|
33
33
|
// нарисовали полигон площади, находясь на этаже:
|
34
34
|
// => Object { coords: Array[8] }
|
@@ -36,8 +36,8 @@ function Area() {
|
|
36
36
|
// полигон площади уже был нарисован, просто вошли на этаж:
|
37
37
|
// => Object { id: 2, tag: "test_area", floor_id: 2, class_name: "C80MapFloors::Area", coords: "10,12,110,112", data: null }
|
38
38
|
|
39
|
-
console.log("<Area.init> parent_floor_json: ");
|
40
|
-
console.log(parent_floor_json);
|
39
|
+
//console.log("<Area.init> parent_floor_json: ");
|
40
|
+
//console.log(parent_floor_json);
|
41
41
|
|
42
42
|
/*
|
43
43
|
Object {
|
@@ -107,6 +107,8 @@ function Area() {
|
|
107
107
|
_this._polygon_overlay = Polygon.createFromSaved(options, true, _map);
|
108
108
|
_this._polygon_overlay.area = _this;
|
109
109
|
_this._polygon_overlay = $(_this._polygon_overlay.polygon);
|
110
|
+
_this._polygon_overlay.attr('id', "map_area_id_"+_this.id); // 20170327-hover: внедряем id полигона площади
|
111
|
+
_this._polygon_overlay.addClass('polygon_overlay'); // 20170327-hover: добавляем css класс for the sake of conciseness при использовании
|
110
112
|
_this._polygon_overlay.hover(_this._mouse_in, _this._mouse_out);
|
111
113
|
_this._calcBBox();
|
112
114
|
|
@@ -14,7 +14,9 @@ function MobjInfoParser() {
|
|
14
14
|
var _sresults_areas = null;
|
15
15
|
|
16
16
|
// используется в _row_area_with_shop() и в _row_area_shop()
|
17
|
-
|
17
|
+
// 20170327-hover: был добавлен id='link_shop_{MAP_AREA_ID}', для подсветки полигона, который соответствует магазину при наведении мышкой на ссылку
|
18
|
+
// 20170327-hover: в тех же целях был добавлен css-класс
|
19
|
+
var _row_area_shop_pattern = "<li><a class='link_shop' href='{HREF}' id='link_shop_{MAP_AREA_ID}' title='{TITLE}' target='_blank'>{TITLE}</a> ({AREA_TITLE}), {PHONE}</li>";
|
18
20
|
|
19
21
|
// используется в _row_area_data()
|
20
22
|
var _row_area_pattern = "<li><a href='{HREF}' title='{AREA_TITLE}' target='_blank'>{AREA_TITLE}</a></li>";
|
@@ -205,6 +207,14 @@ function MobjInfoParser() {
|
|
205
207
|
_umode = umode;
|
206
208
|
};
|
207
209
|
|
210
|
+
/**
|
211
|
+
* 20170327-hover: После того, как вставили html текст (собранный методом makeHtmlText), вызывается этот hook.
|
212
|
+
*
|
213
|
+
*/
|
214
|
+
this.afterPastingHtmlText = function () {
|
215
|
+
$('a.link_shop').hover(_this._row_area_shop_mover, _this._row_area_shop_mout);
|
216
|
+
};
|
217
|
+
|
208
218
|
//--[ private ]-----------------------------------------------------------------------------------------------------
|
209
219
|
|
210
220
|
/**
|
@@ -340,15 +350,52 @@ function MobjInfoParser() {
|
|
340
350
|
* @private
|
341
351
|
*/
|
342
352
|
this._row_area_shop = function (area_json) {
|
353
|
+
//console.log('<_row_area_shop>');
|
354
|
+
/*
|
355
|
+
{ floor_id:6,
|
356
|
+
id: 550, # айди полигона
|
357
|
+
coords: Array,
|
358
|
+
data: {
|
359
|
+
id: 444, # айди Rent-площади
|
360
|
+
desc: '...',
|
361
|
+
is_free: false,
|
362
|
+
price_string: '',
|
363
|
+
square: 130,
|
364
|
+
title: "МЕБ-1"
|
365
|
+
}
|
366
|
+
}
|
367
|
+
*/
|
368
|
+
|
343
369
|
var shop = area_json['data']['shop'];
|
344
370
|
var res = _row_area_shop_pattern;
|
345
371
|
res = res.split('{TITLE}').join(shop['title']);
|
346
372
|
res = res.split('{HREF}').join(shop['url']);
|
347
373
|
res = res.split('{PHONE}').join(shop['tel']);
|
348
374
|
res = res.split('{AREA_TITLE}').join(area_json['data']['title']);
|
375
|
+
res = res.split('{MAP_AREA_ID}').join(area_json['id']);
|
349
376
|
return res;
|
350
377
|
};
|
351
378
|
|
379
|
+
// при наведении мышки на ссылку
|
380
|
+
// будут подсвечиваться соответствующие полигоны
|
381
|
+
// при убирании мышки с ссылки - все полигоны не подсвечены
|
382
|
+
this._row_area_shop_mover = function () {
|
383
|
+
console.log('<_row_area_shop_mover>');
|
384
|
+
|
385
|
+
var map_area_id = $(this).attr('id').split('link_shop_').join('');
|
386
|
+
|
387
|
+
// сначала уберём мышку со всех полигонов
|
388
|
+
$('.polygon_overlay').mouseleave();
|
389
|
+
|
390
|
+
// затем "наведём" мышь на соответствующий полигон
|
391
|
+
$('.polygon_overlay#map_area_id_' + map_area_id).mouseenter();
|
392
|
+
|
393
|
+
};
|
394
|
+
this._row_area_shop_mout = function () {
|
395
|
+
// уберём мышку со всех полигонов
|
396
|
+
$('.polygon_overlay').mouseleave();
|
397
|
+
};
|
398
|
+
|
352
399
|
//--[ init ]--------------------------------------------------------------------------------------------------------
|
353
400
|
|
354
401
|
var _fInit = function () {
|
@@ -1322,8 +1322,9 @@ div#map_wrapper {
|
|
1322
1322
|
cursor: pointer;
|
1323
1323
|
|
1324
1324
|
&:hover, &.hover {
|
1325
|
-
fill: rgba(
|
1326
|
-
stroke: rgba(
|
1325
|
+
fill: rgba(11, 11, 11, 0.26);
|
1326
|
+
stroke: rgba(255, 255, 255, 0.96);
|
1327
|
+
stroke-width: 3px;
|
1327
1328
|
}
|
1328
1329
|
|
1329
1330
|
&.found_area { /* удовлетворяющий поиску ЗАНЯТЫЙ polygon площади */
|
@@ -1369,6 +1370,7 @@ div#map_wrapper {
|
|
1369
1370
|
&:hover, &.hover {
|
1370
1371
|
fill: rgba(131, 131, 131, 0.40);
|
1371
1372
|
stroke: rgba(251, 251, 251, 0.86);
|
1373
|
+
stroke-width: 3px;
|
1372
1374
|
}
|
1373
1375
|
}
|
1374
1376
|
|