visjs / vis-network

:dizzy: Display dynamic, automatically organised, customizable network views.

Home Page:https://visjs.github.io/vis-network/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Straight edge labels incorrectly drawn at origin when angle is 0

TedDriggs opened this issue · comments

Please make sure to read the following list before creating a new issue:

vis-network 9.1.2, when using an edge with "top" for its label alignment, the label jumps to the origin if the two endpoints have the same y coordinate and from.x > to.x. This is because drawLabel doesn't call translate if the rotation angle is zero here, but Label._setAlignment zeroes out the x and y values here seemingly under the belief that the context has already been translated.