mirror of
https://github.com/projectstorm/react-diagrams.git
synced 2025-08-15 17:25:12 +08:00
of course there must be || to check positions if moving is too fast
This commit is contained in:
@ -216,7 +216,7 @@ export class RightAngleLinkWidget extends React.Component<RightAngleLinkProps, R
|
||||
for (let i = 1; i < points.length; i+= points.length - 2) {
|
||||
let dx = Math.abs(points[i].getX() - points[i - 1].getX());
|
||||
let dy = Math.abs(points[i].getY() - points[i - 1].getY());
|
||||
if (dx !== 0 && dy !== 0) {
|
||||
if (dx !== 0 || dy !== 0) {
|
||||
if (dx < dy) {
|
||||
if (i - 1 === 0) { points[i].setPosition(points[i - 1].getX(), points[i].getY()); }
|
||||
else if (i === points.length - 1) { points[i - 1].setPosition(points[i].getX(), points[i - 1].getY());}
|
||||
|
Reference in New Issue
Block a user