Skip to content

Commit 3e32b23

Browse files
committed
minor perf boost in Drawing.selectedPointStyle
1 parent 84ca51f commit 3e32b23

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/components/drawing/index.js

+8-5
Original file line numberDiff line numberDiff line change
@@ -581,11 +581,14 @@ drawing.selectedPointStyle = function(s, trace) {
581581
});
582582
}
583583

584-
s.each(function(d) {
585-
for(var i = 0; i < seq.length; i++) {
586-
seq[i](d3.select(this), d);
587-
}
588-
});
584+
if(seq.length) {
585+
s.each(function(d) {
586+
var pt = d3.select(this);
587+
for(var i = 0; i < seq.length; i++) {
588+
seq[i](pt, d);
589+
}
590+
});
591+
}
589592
};
590593

591594
drawing.tryColorscale = function(marker, prefix) {

0 commit comments

Comments
 (0)