I want to create a resizing ELEMENT which I can resize beyound the bottom limit of a DIV container. As long as I keep the mouse below (DIV container height-25px) the ELEMENT should keep increasing in size and the DIV should keep scrolling. In my case the ELEMENT should increase with +25px and the DIV should scroll down with 25px.
This works fine to set the resized element's height but as soon as I move the mouse again the elements continues to resize from where it was left.
Thank you guys/girls
What I have until now is:
- this.$el.resizable({
- handles: 's',
- stop: function(event,obj){
- if (self.data.scrollingId!=null){
- clearTimeout(self.data.scrollingId);
- self.data.scrollingId=null;
- }
- },
- resize: function(event,obj){
- var boundary=obj.element[0].parentNode.parentNode.parentNode.parentNode.parentNode; /*the div with the scrollbar*/
- if (self.data.scrolling==false){
- if (event.pageY<25){
- self.data.scrollingId=setInterval(function(){
- boundary.scrollTop=boundary.scrollTop-25;
- obj.element.height(parseInt(obj.element[0].style.height)-25);
- },100);
- self.data.scrolling=true;
- }
- if (event.pageY>boundary.offsetHeight-25){
- self.data.scrollingId=setInterval(function(){
- boundary.scrollTop=boundary.scrollTop+25;
- obj.element.height(parseInt(obj.element[0].style.height)+25);
- },100);
- self.data.scrolling=true;
- }
- }else{
- if ((event.pageY>20)&&(event.pageY<boundary.offsetHeight-25)){
- clearTimeout(self.data.scrollingId);
- self.data.scrollingId=null;
- self.data.scrolling=false;
- }
- }
-
- }
- });