// Generated by CoffeeScript 1.4.0 (function() { var load_svg; load_svg = function(filename, container, fit, callback) { return d3.xml(filename, function(error, documentFragment) { var svg_d3, svg_dom; if (error) { throw error; } svg_dom = documentFragment.getElementsByTagName("svg")[0]; d3.select(container).node().appendChild(svg_dom); svg_d3 = d3.select(container).select('svg'); if (fit) { svg_d3.attr('width', '100%').attr('height', '100%'); } return callback(svg_d3); }); }; load_svg('building.svg', '#vis', true, function(svg) { var actives; svg.attr({ width: '960px', height: '500px' }); actives = svg.selectAll('.active'); actives.each(function() { var active; active = d3.select(this); return active.datum({ id: active.attr('id') }); }); return actives.append('title').text(function(d) { return d.id; }); }); }).call(this);