Resizing a div by resizing its borders

Discussion in 'Javascript' started by Proper, Apr 18, 2009.

  1. Proper

    Proper Guest

    What I have so far is this

    http://mxamples.googlepages.com/drag-borders.html

    But this script has a few disadvantages. The main disadvantage is in
    my eyes that the drag event isn't smooth enough, I mean if the mouse
    cursor is too fast it will loose the border and therefore the dragging
    of the border will stop.

    Thats the reason why the borders in the example are so fat. Making the
    borders smaller would show at once what I mean because its no more
    possible to grab the borders with the cursor.

    I know that this can be done in another way, and I've done similar
    things already a few years ago. But I cannot - by no means - remember
    the trick.

    So I'll try to describe it again what I mean: Dragging can have at
    least two results. The first result is seen in my example above that
    loses its object if the pressed mouse cursor goes out of the defined
    area. The second result would continue dragging as long as the cursor
    remains pressed - independant if it goes out of the defined area.

    The second result can be seen - for example - here:

    http://www.twinhelix.com/javascript/dragresize/demo/

    (But this code is obfuscated, so I cannot detect or learn anything).

    Thanks for ræading, and I hope that someone can give me a hint to the
    right direction.
     
    Proper, Apr 18, 2009
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. George
    Replies:
    9
    Views:
    4,919
    George
    Oct 25, 2004
  2. thunk
    Replies:
    1
    Views:
    315
    thunk
    Mar 30, 2010
  3. thunk
    Replies:
    0
    Views:
    488
    thunk
    Apr 1, 2010
  4. thunk
    Replies:
    14
    Views:
    627
    thunk
    Apr 3, 2010
  5. Pil (Trustworthy from Experience)

    Resizing a div by resizing its borders

    Pil (Trustworthy from Experience), Apr 18, 2009, in forum: Javascript
    Replies:
    9
    Views:
    355
    Proper
    Apr 21, 2009
Loading...

Share This Page