开发者

Web based code editor - (smooth) vertical div resizing problem [closed]

开发者 https://www.devze.com 2023-03-26 07:36 出处:网络
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necess
Closed. This question needs debugging details. It is not currently accepting answers.

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 question

I'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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号