Sha256: 8f669b0cc93bae13e8e52026f9349679903db60243357d77bd14142decfcc10e
Contents?: true
Size: 1014 Bytes
Versions: 3
Compression:
Stored size: 1014 Bytes
Contents
"use strict"; function BackToMapButton() { var _map = null; var _this = this; var _cnt = null; var _btn = null; var _onClick = function () { _map.setMode('viewing'); _map.current_area = null; if (_map.current_building) { _map.current_building.exit(); } if (_map.current_area) { _map.current_area.exit(); } _map.svgRemoveAllNodes(); _map.draw_childs(_map.data["childs"]); }; _this.init = function (parent_div_selector, link_to_map) { _map = link_to_map; _cnt = $('<div></div>').addClass('back_to_map_button'); _cnt.appendTo($(parent_div_selector)); _btn = $('<a href="#" id="BackToMapButton">Обратно на карту</a>'); _btn.on('click', _onClick); _cnt.append(_btn); }; _this.show = function () { _cnt.css('display', 'block'); }; _this.hide = function () { _cnt.css('display', 'none'); } }
Version data entries
3 entries across 3 versions & 1 rubygems