Skip to content

Commit

Permalink
Small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lukflug committed Apr 24, 2021
1 parent f08d596 commit c1eb0be
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ public int getHeight (int height) {
@Override
public Context getContext (Context context) {
if (resizing[0]) {
Point p=getComponent().getPosition(context.getInterface());
getComponent().setPosition(context.getInterface(),new Point(p.x,p.y+context.getInterface().getMouse().y-attachPoint.y));
getComponent().setPosition(context.getInterface(),new Point(attachRect.x,attachRect.y+context.getInterface().getMouse().y-attachPoint.y));
size.setSize(new Dimension(attachRect.width,attachRect.height-context.getInterface().getMouse().y+attachPoint.y));
} else if (resizing[1]) {
size.setSize(new Dimension(attachRect.width,attachRect.height+context.getInterface().getMouse().y-attachPoint.y));
Expand All @@ -82,9 +81,7 @@ public Context getContext (Context context) {
} else if (resizing[3]) {
size.setSize(new Dimension(attachRect.width+context.getInterface().getMouse().x-attachPoint.x,attachRect.height));
}
Point p=context.getPos();
p.translate(renderer.getBorder(),renderer.getBorder());
return new Context(context,context.getSize().width-2*renderer.getBorder(),p,true,true);
return new Context(context,context.getSize().width-2*renderer.getBorder(),new Point(renderer.getBorder(),renderer.getBorder()),true,true);
}

@Override
Expand Down

0 comments on commit c1eb0be

Please sign in to comment.