src/swimlane.js
function wrap (factory, node, tag) {
    // If there is a previous node that is not text, insert a new line to
    // for 
    if (node.previousSibling != null && node.previousSibling.nodeType != 3) {
        var newline = factory.createTextNode("\n");
        body.insertBefore(newline, node);
    }
    var wrapper = factory.createElement(tag);
    node.parentNode.insertBefore(wrapper, node);
    wrapper.appendChild(node);
    return wrapper;
  }
function wrap (factory, node, tag) {
    // If there is a previous node that is not text, insert a new line to
    // for 
    if (node.previousSibling != null && node.previousSibling.nodeType != 3) {
        var newline = factory.createTextNode("\n");
        body.insertBefore(newline, node);
    }
    var wrapper = factory.createElement(tag);
    node.parentNode.insertBefore(wrapper, node);
    wrapper.appendChild(node);
    return wrapper;
  }
function wrap ( factory , node , tag ) { // If there is a previous node that is not text, insert a new line to // for  if ( node . previousSibling != null && node . previousSibling . nodeType != 3 ) { var newline = factory . createTextNode ( "\n" ) ; body . insertBefore ( newline , node ) ; } var wrapper = factory . createElement ( tag ) ; node . parentNode . insertBefore ( wrapper , node ) ; wrapper . appendChild ( node ) ; return wrapper ; }
Wraps the given node in a new element with the given tag created using the given factory.
Wraps the given node in a new element with the given tag created using the given factory .