javascript - How to drag a DIV so its width and height are negative values? -


I'm a little stumped here. I am developing a feedback utility which will allow the user to draw the "Draw" box on the web page to highlight the problem areas. Right now I have an overlay DIV which fills the screen and jQuery allows you to draw and draw red-streaked DIV by clicking and dragging. Here's a JSField:

The problem is that I can not drag the box up or down, the first click on the top left corner where the mouse was clicked. After stretching the box width will change later. Leaving the mouse will complete the box and you can start another drawing again. If you pull the left or up while dragging the div, its width will remain at 0 while drawing, but will not be negative.

Any suggestion is appreciated.

Here you can find work solutions:

Comments

Popular posts from this blog

mysql - BLOB/TEXT column 'value' used in key specification without a key length -

c# - Using Vici cool Storage with monodroid -

python - referencing a variable in another function? -