Changeset 608


Ignore:
Timestamp:
12/12/13 10:13:25 (11 years ago)
Author:
jts21
Message:

Fix cropped image positioning so cropped images are always touching the cursor at a corner

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/expeditee/gui/FrameMouseActions.java

    r604 r608  
    638638                                int width = cropped.getWidth();
    639639                                int height = cropped.getHeight();
    640                                 if(cropped.getX() + width < MouseX) {
    641                                         cropped.setX(MouseX - width);
    642                                 }
    643                                 if(cropped.getY() + height < MouseY) {
    644                                         cropped.setY(MouseY - height);
     640                                if(cropped.getSource().getX() + width < MouseX) {
     641                                        cropped.getSource().setX(MouseX - width);
     642                                }
     643                                if(cropped.getSource().getY() + height < MouseY) {
     644                                        cropped.getSource().setY(MouseY - height);
    645645                                }
    646646                                pickup(cropped);
Note: See TracChangeset for help on using the changeset viewer.