~smagoun/whoopsie/whoopsie-lp1017637

« back to all changes in this revision

Viewing changes to backend/stats/static/js/d3/src/core/selection-insert.js

  • Committer: Evan Dandrea
  • Date: 2012-05-09 05:53:45 UTC
  • Revision ID: evan.dandrea@canonical.com-20120509055345-z2j41tmcbf4as5uf
The backend now lives in lp:daisy and the website (errors.ubuntu.com) now lives in lp:errors.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// TODO insert(node, function)?
2
 
// TODO insert(function, string)?
3
 
// TODO insert(function, function)?
4
 
d3_selectionPrototype.insert = function(name, before) {
5
 
  name = d3.ns.qualify(name);
6
 
 
7
 
  function insert() {
8
 
    return this.insertBefore(
9
 
        document.createElementNS(this.namespaceURI, name),
10
 
        d3_select(before, this));
11
 
  }
12
 
 
13
 
  function insertNS() {
14
 
    return this.insertBefore(
15
 
        document.createElementNS(name.space, name.local),
16
 
        d3_select(before, this));
17
 
  }
18
 
 
19
 
  return this.select(name.local ? insertNS : insert);
20
 
};