diff --git a/lib/network/modules/CanvasRenderer.js b/lib/network/modules/CanvasRenderer.js index 5485687dee..7dfe47a7b8 100644 --- a/lib/network/modules/CanvasRenderer.js +++ b/lib/network/modules/CanvasRenderer.js @@ -308,6 +308,8 @@ class CanvasRenderer { (this.zooming === true && this.options.hideEdgesOnZoom === false)) ) { this._drawEdges(ctx); + // draw arrows first so they end up below nodes + this._drawArrows(ctx); } } @@ -319,19 +321,6 @@ class CanvasRenderer { drawLater.drawExternalLabels = drawExternalLabels; } - // draw the arrows last so they will be at the top - if (hidden === false) { - if ( - (this.dragging === false || - (this.dragging === true && - this.options.hideEdgesOnDrag === false)) && - (this.zooming === false || - (this.zooming === true && this.options.hideEdgesOnZoom === false)) - ) { - this._drawArrows(ctx); - } - } - if (drawLater.drawExternalLabels != null) { drawLater.drawExternalLabels(); }