fix rope
This commit is contained in:
parent
ae55b1b851
commit
a141d05e87
|
|
@ -125,7 +125,7 @@ export class FolkRope extends FolkBaseConnection {
|
||||||
let target: Point;
|
let target: Point;
|
||||||
|
|
||||||
if (sourceRect instanceof DOMRectTransform) {
|
if (sourceRect instanceof DOMRectTransform) {
|
||||||
source = Vector.lerp(sourceRect.bottomRight, sourceRect.bottomLeft, 0.5);
|
source = sourceRect.toParentSpace({ x: sourceRect.width / 2, y: sourceRect.height });
|
||||||
} else {
|
} else {
|
||||||
source = {
|
source = {
|
||||||
x: sourceRect.x + sourceRect.width / 2,
|
x: sourceRect.x + sourceRect.width / 2,
|
||||||
|
|
@ -134,7 +134,7 @@ export class FolkRope extends FolkBaseConnection {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (targetRect instanceof DOMRectTransform) {
|
if (targetRect instanceof DOMRectTransform) {
|
||||||
target = Vector.lerp(targetRect.bottomRight, targetRect.bottomLeft, 0.5);
|
target = targetRect.toParentSpace({ x: targetRect.width / 2, y: targetRect.height });
|
||||||
} else {
|
} else {
|
||||||
target = {
|
target = {
|
||||||
x: targetRect.x + targetRect.width / 2,
|
x: targetRect.x + targetRect.width / 2,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue