Sha256: 211f7ff15da19532c8bf0c0fa9a69b19d100343847feeffb0f32448e0b1164ba

Contents?: true

Size: 1.04 KB

Versions: 51

Compression:

Stored size: 1.04 KB

Contents

var AreaLabel = function (options, link_to_map) {

    if (options.area_hash != undefined && typeof options.area_hash.id != 'undefined') {

        this._x = options.coords[0];
        this._y = options.coords[1];
        this._map = link_to_map;

        // создадим узел, который будет помещён в дерево и будет виден пользователю
        this._g = document.createElementNS('http://www.w3.org/2000/svg', 'g');
        this._text_element_ns = document.createElementNS('http://www.w3.org/2000/svg', 'text');
        this._text_element_ns.setAttribute('x', this._x);
        this._text_element_ns.setAttribute('y', this._y);
        this._text_element_ns.setAttribute('fill', '#000000');
        this._text_element_ns.setAttribute('style', 'font-size:12px;font-weight:bold;');
        this._text_element_ns.textContent = "id="+options.area_hash.id + "; " + options.area_hash.title;

        //
        this._map.addNodeToSvg(this._g, true);
        this._g.appendChild(this._text_element_ns);

    }


};

Version data entries

51 entries across 51 versions & 2 rubygems

Version Path
c80_map_floors-0.2.2 app/assets/javascripts/svg_elements/area_label.js
c80_map_floors-0.2.1 app/assets/javascripts/svg_elements/area_label.js
c80_map_floors-0.2.0.8 app/assets/javascripts/svg_elements/area_label.js
c80_map_floors-0.2.0.7 app/assets/javascripts/svg_elements/area_label.js
c80_map_floors-0.2.0.6 app/assets/javascripts/svg_elements/area_label.js
c80_map_floors-0.2.0.5 app/assets/javascripts/svg_elements/area_label.js
c80_map_floors-0.2.0.4 app/assets/javascripts/svg_elements/area_label.js
c80_map_floors-0.2.0.3 app/assets/javascripts/svg_elements/area_label.js
c80_map_floors-0.2.0.2 app/assets/javascripts/svg_elements/area_label.js
c80_map_floors-0.2.0.1 app/assets/javascripts/svg_elements/area_label.js
c80_map_floors-0.2.0.0 app/assets/javascripts/svg_elements/area_label.js
c80_map_floors-0.1.0.25 app/assets/javascripts/svg_elements/area_label.js
c80_map_floors-0.1.0.24 app/assets/javascripts/svg_elements/area_label.js
c80_map_floors-0.1.0.23 app/assets/javascripts/svg_elements/area_label.js
c80_map_floors-0.1.0.22 app/assets/javascripts/svg_elements/area_label.js
c80_map_floors-0.1.0.21 app/assets/javascripts/svg_elements/area_label.js
c80_map_floors-0.1.0.20 app/assets/javascripts/svg_elements/area_label.js
c80_map_floors-0.1.0.19 app/assets/javascripts/svg_elements/area_label.js
c80_map_floors-0.1.0.18 app/assets/javascripts/svg_elements/area_label.js
c80_map_floors-0.1.0.17 app/assets/javascripts/svg_elements/area_label.js