Skip to content

Commit

Permalink
modified the _showLoading method in your hmr-chat.js, also removed th…
Browse files Browse the repository at this point in the history
…e top and right positioning on the .hmr-loading-modal:before rule
  • Loading branch information
sirmeeLynx committed Feb 3, 2018
1 parent b64072a commit 49a120e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/jquery.hmr-chat.css
Expand Up @@ -267,12 +267,10 @@
display: none;
position: fixed;
z-index: 999;
top: 0;
left: 0;
bottom: 0;
right: 0;
width: 100%;
height: 100%;
width: 395.41px;
height: 273px;
background-color: rgba(0,0,0,0.3);
}

Expand Down
4 changes: 3 additions & 1 deletion src/jquery.hmr-chat.js
Expand Up @@ -196,7 +196,9 @@
}

function _showLoading() {
$chatboxWindow.addClass('hmr-loading');
var $sheet = $("#__custom"), cssText = `.hmr-loading-modal:before { width: ${$chatboxWindow.innerWidth() - 15}px !important; height: ${$chatboxWindow.innerHeight()}px !important;}`;//for a fixed position on :before, width,height of 100% will only be relative to that of the body element, hence using the chatbox size to determine the overlay size
$sheet.length ? $sheet.html(cssText) : $('<style id="__custom" />').html(cssText).appendTo("head");//did a css Overide on the pseudo:before, since it is not a dom element, no jquery Api can modify d style
$chatboxWindow.addClass('hmr-loading');
}

function _hideLoading() {
Expand Down

0 comments on commit 49a120e

Please sign in to comment.