- Fix (ext-connector): Handle case of 2 connecting elements with same y-coordinate (fixes #210 ; thanks, @iuyiuy!)

master
Brett Zamir 2018-05-28 20:29:22 +08:00
parent c2e06534ff
commit 5b23b93154
1 changed files with 3 additions and 1 deletions

View File

@ -60,7 +60,9 @@ svgEditor.addExtension('Connector', function (S) {
if (slope < bb.height / bb.width) {
ratio = (bb.width / 2) / Math.abs(lenX);
} else {
ratio = (bb.height / 2) / Math.abs(lenY);
ratio = lenY
? (bb.height / 2) / Math.abs(lenY)
: 0;
}
return {