Skip to content

Commit ef06bb6

Browse files
committed
fix-bug: drag&drop broken
1 parent 213b1ee commit ef06bb6

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "orgchart",
3-
"version": "2.0.11",
3+
"version": "2.0.12",
44
"homepage": "https://github.com/dabeng/OrgChart",
55
"authors": [
66
"dabeng <[email protected]>"

demo/js/jquery.orgchart.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/js/jquery.orgchart.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "orgchart",
3-
"version": "2.0.11",
3+
"version": "2.0.12",
44
"description": "Simple and direct organization chart(tree-like hierarchy) plugin based on pure DOM and jQuery.",
55
"main": "./dist/js/jquery.orgchart.min.js",
66
"style": [

src/js/jquery.orgchart.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@
974974
$dropZone.append('<i class="edge verticalEdge bottomEdge fa"></i>')
975975
.parent().attr('colspan', 2)
976976
.parent().after('<tr class="lines"><td colspan="2"><div class="downLine"></div></td></tr>'
977-
+ '<tr class="lines"><td class="rightLine">&nbsp;</td><td class="leftLine">&nbsp;</td></tr>'
977+
+ '<tr class="lines"><td class="rightLine"></td><td class="leftLine"></td></tr>'
978978
+ '<tr class="nodes"></tr>')
979979
.siblings(':last').append($dragged.find('.horizontalEdge').remove().end().closest('table').parent());
980980
} else {
@@ -984,7 +984,7 @@
984984
if (!$dragged.find('.horizontalEdge').length) {
985985
$dragged.append(horizontalEdges);
986986
}
987-
$dropZone.closest('tr').siblings().eq(1).children(':last').before('<td class="leftLine topLine">&nbsp;</td><td class="rightLine topLine">&nbsp;</td>')
987+
$dropZone.closest('tr').siblings().eq(1).children(':last').before('<td class="leftLine topLine"></td><td class="rightLine topLine"></td>')
988988
.end().next().append($dragged.closest('table').parent());
989989
var $dropSibs = $dragged.closest('table').parent().siblings().find('.node:first');
990990
if ($dropSibs.length === 1) {
@@ -1168,7 +1168,7 @@
11681168
.done(function($nodeDiv) {
11691169
$table.append($('<tr class="hidden">').append($('<td colspan="2">').append($nodeDiv.removeClass('slide-up').addClass('slide-down'))));
11701170
$table.append('<tr class="lines hidden"><td colspan="2"><div class="downLine"></div></td></tr>');
1171-
var linesRow = '<td class="rightLine">&nbsp;</td><td class="leftLine">&nbsp;</td>';
1171+
var linesRow = '<td class="rightLine"></td><td class="leftLine"></td>';
11721172
$table.append('<tr class="lines hidden">' + linesRow + '</tr>');
11731173
var $chart = that.$chart;
11741174
$chart.prepend($table)
@@ -1194,7 +1194,7 @@
11941194
complementLine: function ($oneSibling, siblingCount, existingSibligCount) {
11951195
var lines = '';
11961196
for (var i = 0; i < existingSibligCount; i++) {
1197-
lines += '<td class="leftLine topLine">&nbsp;</td><td class="rightLine topLine">&nbsp;</td>';
1197+
lines += '<td class="leftLine topLine"></td><td class="rightLine topLine"></td>';
11981198
}
11991199
$oneSibling.parent().prevAll('tr:gt(0)').children().attr('colspan', siblingCount * 2)
12001200
.end().next().children(':first').after(lines);

0 commit comments

Comments
 (0)