|
863 | 863 | if (!$dropZone.closest('tr').siblings().length) { // if the drop zone is a leaf node |
864 | 864 | $dropZone.append('<i class="edge verticalEdge bottomEdge fa"></i>') |
865 | 865 | .parent().attr('colspan', 2) |
866 | | - .parent().after('<tr class="lines"><td colspan="2"><div class="down"></div></td></tr>' |
867 | | - + '<tr class="lines"><td class="right"> </td><td class="left"> </td></tr>' |
| 866 | + .parent().after('<tr class="lines"><td colspan="2"><div class="downLine"></div></td></tr>' |
| 867 | + + '<tr class="lines"><td class="rightLine"> </td><td class="leftLine"> </td></tr>' |
868 | 868 | + '<tr class="nodes"></tr>') |
869 | 869 | .siblings(':last').append($dragged.find('.horizontalEdge').remove().end().closest('table').parent()); |
870 | 870 | } else { |
|
874 | 874 | if (!$dragged.find('.horizontalEdge').length) { |
875 | 875 | $dragged.append(horizontalEdges); |
876 | 876 | } |
877 | | - $dropZone.closest('tr').siblings().eq(1).children(':last').before('<td class="left top"> </td><td class="right top"> </td>') |
| 877 | + $dropZone.closest('tr').siblings().eq(1).children(':last').before('<td class="leftLine topLine"> </td><td class="rightLine topLine"> </td>') |
878 | 878 | .end().next().append($dragged.closest('table').parent()); |
879 | 879 | var $dropSibs = $dragged.closest('table').parent().siblings().find('.node:first'); |
880 | 880 | if ($dropSibs.length === 1) { |
|
943 | 943 |
|
944 | 944 | // draw the line close to parent node |
945 | 945 | if (!isVerticalLayer) { |
946 | | - $nodeWrapper.append('<tr class="lines' + isHidden + '"><td colspan="' + $childNodes.length * 2 + '"><div class="down"></div></td></tr>'); |
| 946 | + $nodeWrapper.append('<tr class="lines' + isHidden + '"><td colspan="' + $childNodes.length * 2 + '"><div class="downLine"></div></td></tr>'); |
947 | 947 | } |
948 | 948 | // draw the lines close to children nodes |
949 | | - var lineLayer = '<tr class="lines' + isHidden + '"><td class="right"> </td>'; |
| 949 | + var lineLayer = '<tr class="lines' + isHidden + '"><td class="rightLine"> </td>'; |
950 | 950 | for (var i=1; i<$childNodes.length; i++) { |
951 | | - lineLayer += '<td class="left top"> </td><td class="right top"> </td>'; |
| 951 | + lineLayer += '<td class="leftLine topLine"> </td><td class="rightLine topLine"> </td>'; |
952 | 952 | } |
953 | | - lineLayer += '<td class="left"> </td></tr>'; |
| 953 | + lineLayer += '<td class="leftLine"> </td></tr>'; |
954 | 954 | var $nodeLayer; |
955 | 955 | if (isVerticalLayer) { |
956 | 956 | $nodeLayer = $('<ul>'); |
|
1005 | 1005 | $.when(createNode(nodeData, 0, opts || $currentRoot.closest('.orgchart').data('options'))) |
1006 | 1006 | .done(function($nodeDiv) { |
1007 | 1007 | $table.append($nodeDiv.removeClass('slide-up').addClass('slide-down').wrap('<tr class="hidden"><td colspan="2"></td></tr>').closest('tr')); |
1008 | | - $table.append('<tr class="lines hidden"><td colspan="2"><div class="down"></div></td></tr>'); |
1009 | | - var linesRow = '<td class="right"> </td><td class="left"> </td>'; |
| 1008 | + $table.append('<tr class="lines hidden"><td colspan="2"><div class="downLine"></div></td></tr>'); |
| 1009 | + var linesRow = '<td class="rightLine"> </td><td class="leftLine"> </td>'; |
1010 | 1010 | $table.append('<tr class="lines hidden">' + linesRow + '</tr>'); |
1011 | 1011 | var $oc = that.children('.orgchart'); |
1012 | 1012 | $oc.prepend($table) |
|
1033 | 1033 | function complementLine($oneSibling, siblingCount, existingSibligCount) { |
1034 | 1034 | var lines = ''; |
1035 | 1035 | for (var i = 0; i < existingSibligCount; i++) { |
1036 | | - lines += '<td class="left top"> </td><td class="right top"> </td>'; |
| 1036 | + lines += '<td class="leftLine topLine"> </td><td class="rightLine topLine"> </td>'; |
1037 | 1037 | } |
1038 | 1038 | $oneSibling.parent().prevAll('tr:gt(0)').children().attr('colspan', siblingCount * 2) |
1039 | 1039 | .end().next().children(':first').after(lines); |
|
0 commit comments