thecodeholic / lobipanel

jQuery plugin for bootstrap panels. It extends panels with several common and useful functions.
MIT License
168 stars 75 forks source link

Drag issue with Lobipanel #12

Closed jqueryuser1 closed 8 years ago

jqueryuser1 commented 8 years ago

Anyone knows a fix for the following issue? Unpin a form then move it up in your browser until the header is not visible anymore. You won't be able to pin the window or take control of the form anymore without refreshing the entire page.

thecodeholic commented 8 years ago

This is a bug which is going to be fixed in next updates.

jqueryuser1 commented 8 years ago

Thank you,

Any workaround to disable moving the form too high and loose control over it?

thecodeholic commented 8 years ago

For now I can not think the way how it can be fixed without updating the core of the plugin. Thank you too

shogunfighter commented 8 years ago

I guess you need to limit the dragging of the lobipanel inside the html document. This tells the jquery ui (dragging module) to limit the dragging inside the html document only.. I suggest you do this.

Open the lobipanel.js > find this.enableDrag=function(){}

this.enableDrag = function(){ me.$el.draggable({ handle: '.panel-heading',

//add the following codes containment: "document", scroll: false

}); return me; };

jqueryuser1 commented 8 years ago

Thanks,

I have tested it and it seems to only work if  the panel is unpinned when there’s no scrolling on the page.

If you unpin a panel after scrolling down your page (panel located at the bottom of your page) and move it up, the issue remains.

If however you unpin a panel located at the top of the page (without scrolling down), it works.

Any idea ?

Regards

From: shogunfighter notifications@github.com Reply-To: arboshiki/lobipanel reply@reply.github.com Date: Tuesday 28 June 2016 at 06:19 To: arboshiki/lobipanel lobipanel@noreply.github.com Cc: hichem agrebi hichem@agrebi.com, Author author@noreply.github.com Subject: Re: [arboshiki/lobipanel] Drag issue with Lobipanel (#12)

I guess you need to limit the dragging of the lobipanel inside the html document. This tells the jquery ui (dragging module) to limit the dragging inside the html document only.. I suggest you do this.

Open the lobipanel.js > find this.enableDrag=function(){}

this.enableDrag = function(){ me.$el.draggable({ handle: '.panel-heading',

//add the following codes containment: "document", scroll: false

}); return me; };

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

shogunfighter commented 8 years ago

@jqueryuser1

I bet you just need to customize the draggable containment parameters in such a way the lobipanel wont throw out of the window/page. Maybe you can try using a different containment parameter aside from "document". You can create your own <div> and limit the dragging of the lobipanel inside that <div>

More info: jquery > draggable > containment

thecodeholic commented 8 years ago

This issue is fixed. I pushed the commit on master branch. Please check it out, if it's fixed

jqueryuser1 commented 8 years ago

Good afternoon,

I was wondering whether it is possible to move the Lobipanel outside of the current page to make full use of extended or two screen monitors ?

Thanks

Regatds

Hichem

From: shogunfighter notifications@github.com Reply-To: arboshiki/lobipanel reply@reply.github.com Date: Tuesday 28 June 2016 at 06:19 To: arboshiki/lobipanel lobipanel@noreply.github.com Cc: hichem agrebi hichem@agrebi.com, Author author@noreply.github.com Subject: Re: [arboshiki/lobipanel] Drag issue with Lobipanel (#12)

I guess you need to limit the dragging of the lobipanel inside the html document. This tells the jquery ui (dragging module) to limit the dragging inside the html document only.. I suggest you do this.

Open the lobipanel.js > find this.enableDrag=function(){}

this.enableDrag = function(){ me.$el.draggable({ handle: '.panel-heading',

//add the following codes containment: "document", scroll: false

}); return me; };

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

thecodeholic commented 8 years ago

Hello, No this is not possible not in Lobipanel and not in any other web plugin. Browser does not allow this to move its DOM element outside of it.

On Aug 2, 2016 10:05 PM, "jqueryuser1" notifications@github.com wrote:

Good afternoon,

I was wondering whether it is possible to move the Lobipanel outside of the current page to make full use of extended or two screen monitors ?

Thanks

Regatds

Hichem

From: shogunfighter notifications@github.com Reply-To: arboshiki/lobipanel reply@reply.github.com Date: Tuesday 28 June 2016 at 06:19 To: arboshiki/lobipanel lobipanel@noreply.github.com Cc: hichem agrebi hichem@agrebi.com, Author author@noreply.github.com Subject: Re: [arboshiki/lobipanel] Drag issue with Lobipanel (#12)

I guess you need to limit the dragging of the lobipanel inside the html document. This tells the jquery ui (dragging module) to limit the dragging inside the html document only.. I suggest you do this.

Open the lobipanel.js > find this.enableDrag=function(){}

this.enableDrag = function(){ me.$el.draggable({ handle: '.panel-heading',

//add the following codes containment: "document", scroll: false

}); return me; };

— You are receiving this because you authored the thread.

Reply to this email directly, view it on GitHub, or mute the thread.

— You are receiving this because you modified the open/close state.

Reply to this email directly, view it on GitHub https://github.com/arboshiki/lobipanel/issues/12#issuecomment-236990147, or mute the thread https://github.com/notifications/unsubscribe-auth/AEad0nwh3OKKfsx876P3NN4WfDWiiFV2ks5qb4bqgaJpZM4IpJ_k .