Skip to content

Commit 7fbc54b

Browse files
committed
only add 'split' to the node in the next column if part of it ended up in the current column
1 parent bf9fd17 commit 7fbc54b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/jquery.columnizer.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@
289289
// it in half, leaving some of it in pullOutHere
290290
$clone.empty();
291291
if(!columnize($clone, $cloneMe, $parentColumn, targetHeight)){
292-
// this node still has non-text nodes to split
292+
// this node may still have non-text nodes to split
293293
// add the split class and then recur
294294
$cloneMe.addClass(prefixTheClassName("split"));
295295

@@ -310,6 +310,7 @@
310310
if($clone.get(0).childNodes.length === 0){
311311
// it was split, but nothing is in it :(
312312
$clone.remove();
313+
$cloneMe.removeClass(prefixTheClassName("split"));
313314
}
314315
}
315316
}

0 commit comments

Comments
 (0)