wip
This commit is contained in:
@@ -101,13 +101,13 @@ export const connections = function(superClass) {
|
||||
const canvasRect = this.canvas.getBoundingClientRect();
|
||||
|
||||
const start = {
|
||||
x: sourceRect.left + sourceRect.width/2 - canvasRect.left,
|
||||
y: sourceRect.top + sourceRect.height/2 - canvasRect.top
|
||||
x: (sourceRect.left + sourceRect.width/2 - canvasRect.left) / this.scale,
|
||||
y: (sourceRect.top + sourceRect.height/2 - canvasRect.top) / this.scale
|
||||
};
|
||||
|
||||
const end = {
|
||||
x: this.mousePosition.x - canvasRect.left,
|
||||
y: this.mousePosition.y - canvasRect.top
|
||||
x: (this.mousePosition.x - canvasRect.left) / this.scale,
|
||||
y: (this.mousePosition.y - canvasRect.top) / this.scale
|
||||
};
|
||||
|
||||
const controlPoint1 = {
|
||||
@@ -150,13 +150,13 @@ export const connections = function(superClass) {
|
||||
const canvasRect = this.canvas.getBoundingClientRect();
|
||||
|
||||
const start = {
|
||||
x: sourceRect.left + sourceRect.width/2 - canvasRect.left,
|
||||
y: sourceRect.top + sourceRect.height/2 - canvasRect.top
|
||||
x: (sourceRect.left + sourceRect.width/2 - canvasRect.left) / this.scale,
|
||||
y: (sourceRect.top + sourceRect.height/2 - canvasRect.top) / this.scale
|
||||
};
|
||||
|
||||
const end = {
|
||||
x: targetRect.left + targetRect.width/2 - canvasRect.left,
|
||||
y: targetRect.top + targetRect.height/2 - canvasRect.top
|
||||
x: (targetRect.left + targetRect.width/2 - canvasRect.left) / this.scale,
|
||||
y: (targetRect.top + targetRect.height/2 - canvasRect.top) / this.scale
|
||||
};
|
||||
|
||||
const controlPoint1 = {
|
||||
|
||||
Reference in New Issue
Block a user