1. I've started a massive SPAM purge, any accounts that have spammed are being removed, also for a short period new user signups are disallowed until the SPAM cleaning is finished.

How to make rectangle..

Discussion in 'Java Script/AJAX' started by morris, Sep 2, 2007.

Thread Status:
Not open for further replies.
  1. morris

    morris New Member

    Joined:
    Aug 31, 2007
    Messages:
    65
    Likes Received:
    0
    Trophy Points:
    0
    Hello

    I am displaying an image in the browser using the <img> tag
    When the mouse is over the image, I change its style to crosshair

    I would like to allow the user to mark a rectangle ontop of the image by letting him press the mouse button, drag it across the image and then release it. The first coordinate where the mouse is clicked will be the rectangle first corner and the coordinates where the mouse button is released will be the opposite corner
    Is this sort of thing possible?
    I thought about rendering the rectangle using layers, with absolute position on top of the image
    I also would like to show the rectangle that the user is rendering as the mouse is moving and not only after the mouse button is released
    The problem is also that once the user presses the mouse button and drags the mouse, the cursor changes from crosshair. Can I control this behaviour?

    any help or insight will be appreciated
    Thanks
    Loading...
Thread Status:
Not open for further replies.

Share This Page