Web based code editor - (smooth) vertical div resizing problem [closed]
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed last year.
Improve this questionI'm building a web based editor which has a console panel at bottom (like eclipse etc). I've been trying (unsuccessfully) for the past two days to implement the resize functionality
-the user can grab a splitter between the editor and the console and resize their heights.
But I've not been able to make the resizing operation smooth. It works only if the user slowly drags the splitter, if he does it fast (like we all do when we resize) it fails. :(
Here's a small portion of my code: http://pastie.org/2324838 (save in file and launch in browser).
I'm targeting IE 7+, Firefox 3.6+, Chrome and Safar开发者_JAVA技巧i 4+
I would suggest altering your mouse events so that it doesn't stop dragging when the mouse is outside of the splitter, only when the person releases the mouse button. This will mean if the person moves the mouse quickly the splitter should still be able to catch up.
精彩评论