Skip to content

Commit

Permalink
Merge pull request #398 from MaslowCNC/Fix-connection-issue-to-attach…
Browse files Browse the repository at this point in the history
…ment-points

Fix connection issue for translate
  • Loading branch information
BarbourSmith committed Apr 1, 2020
2 parents b96cc85 + aab6b69 commit f94dd40
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/js/prototypes/attachmentpoint.js
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,11 @@ export default class AttachmentPoint {

}
this.showHoverText = true
if (GlobalVariables.distBetweenPoints(xInPixels, x, yInPixels, y) < radiusInPixels/1.2 ){
this.expandedRadius = true
if (GlobalVariables.distBetweenPoints(xInPixels, x, yInPixels, y) < radiusInPixels/2.1 ){
this.expandedRadius = true
}
else{
this.expandedRadius = false
this.expandedRadius = false
}
}
else{
Expand Down Expand Up @@ -408,10 +408,10 @@ export default class AttachmentPoint {
* @param {number} y - The y coordinate of the target
*/
wasConnectionMade(x,y){

let xInPixels = GlobalVariables.widthToPixels(this.x)
let yInPixels = GlobalVariables.heightToPixels(this.y)
let radiusInPixels = GlobalVariables.widthToPixels(this.radius)
let radiusInPixels = GlobalVariables.widthToPixels(this.radius/2.1)

//this function returns itself if the coordinates passed in are within itself
if (GlobalVariables.distBetweenPoints(xInPixels, x, yInPixels, y) < radiusInPixels && this.type == 'input'){ //If we have released the mouse here and this is an input...
Expand Down

0 comments on commit f94dd40

Please sign in to comment.