Skip to content

Commit 9528621

Browse files
committed
Remove html of decayed events
1 parent 77680c6 commit 9528621

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

app/public/js/main.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,6 @@ function drawEvent(data, svg_area) {
318318
.transition()
319319
.duration(max_life)
320320
.style('opacity', 0)
321-
//.each(function(){
322-
// circle_group.remove();
323-
// })
324321
.remove();
325322

326323

@@ -349,4 +346,10 @@ function drawEvent(data, svg_area) {
349346
.duration(5000)
350347
.each(function() { no_label = true; })
351348
.remove();
349+
350+
// Remove HTML of decayed events
351+
// Keep it less than 50
352+
if($('#area svg g').length > 50){
353+
$('#area svg g:lt(10)').remove();
354+
}
352355
}

0 commit comments

Comments
 (0)