mintria89 / jquery-loadmask

Automatically exported from code.google.com/p/jquery-loadmask
Other
0 stars 0 forks source link

Show Load Div in Viewport #14

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Have a page with a large scroll

Please update so the div shows in the view port not the auto height of the div 
when applying a load to the body.  i.e. $("body").mask()

Original issue reported on code.google.com by jmill....@gmail.com on 11 Apr 2012 at 8:56

GoogleCodeExporter commented 9 years ago
Replace this: line 86  //calculate center position
            maskMsgDiv.css("top", Math.round(element.height() / 2 - (maskMsgDiv.height() - parseInt(maskMsgDiv.css("padding-top")) - parseInt(maskMsgDiv.css("padding-bottom"))) / 2)+"px");
            maskMsgDiv.css("left", Math.round(element.width() / 2 - (maskMsgDiv.width() - parseInt(maskMsgDiv.css("padding-left")) - parseInt(maskMsgDiv.css("padding-right"))) / 2)+"px");

with this:  //calculate center position
            maskMsgDiv.css("position", "fixed");
            maskMsgDiv.css("top", "50%");
            maskMsgDiv.css("left", Math.round(element.width() / 2 - (maskMsgDiv.width() - parseInt(maskMsgDiv.css("padding-left")) - parseInt(maskMsgDiv.css("padding-right"))) / 2)+"px");

Original comment by michael....@gmail.com on 16 Sep 2014 at 4:44