forked from Gitlink/forgeplus-react
Merge branch 'gitlink_server' of https://git.trustie.net/Gitlink/forgeplus-react into gitlink_server_issue
This commit is contained in:
commit
824e7ce48a
|
@ -831,7 +831,7 @@
|
|||
if (scrollTop === 0) {
|
||||
preview.scrollTop(0);
|
||||
}
|
||||
else if (scrollTop + height >= cmScroll.scrollHeight - 16) {
|
||||
else if (scrollTop + height >= cmScroll.scrollHeight - 30) {
|
||||
preview.scrollTop(preview[0].scrollHeight);
|
||||
}
|
||||
else {
|
||||
|
@ -1471,7 +1471,6 @@
|
|||
var preview = $this.preview;
|
||||
var codeMirror = $this.codeMirror;
|
||||
var codeView = codeMirror.find(".CodeMirror-scroll");
|
||||
|
||||
var height = codeView.height();
|
||||
var scrollTop = codeView.scrollTop();
|
||||
var percent = (scrollTop / codeView[0].scrollHeight);
|
||||
|
@ -1483,11 +1482,11 @@
|
|||
|
||||
var tocMenuHeight = preview.find(".editormd-toc-menu").height();
|
||||
tocMenuHeight = (!tocMenuHeight) ? 0 : tocMenuHeight;
|
||||
|
||||
|
||||
if (scrollTop === 0) {
|
||||
preview.scrollTop(0);
|
||||
}
|
||||
else if (scrollTop + height >= codeView[0].scrollHeight - 16) {
|
||||
else if (scrollTop + height >= codeView[0].scrollHeight - 30) {
|
||||
preview.scrollTop(preview[0].scrollHeight);
|
||||
}
|
||||
else {
|
||||
|
@ -1595,8 +1594,8 @@
|
|||
codeMirror.find(".CodeMirror-scroll").bind(mouseOrTouch("scroll", "touchmove"), function (event) {
|
||||
var height = $(this).height();
|
||||
var scrollTop = $(this).scrollTop();
|
||||
var percent = (scrollTop / $(this)[0].scrollHeight);
|
||||
|
||||
var percent = (scrollTop / ($(this)[0].scrollHeight-100));
|
||||
console.log(percent);
|
||||
var tocHeight = 0;
|
||||
|
||||
preview.find(".markdown-toc-list").each(function () {
|
||||
|
@ -1609,7 +1608,7 @@
|
|||
if (scrollTop === 0) {
|
||||
preview.scrollTop(0);
|
||||
}
|
||||
else if (scrollTop + height >= $(this)[0].scrollHeight - 16) {
|
||||
else if (scrollTop + height >= $(this)[0].scrollHeight - 30) {
|
||||
preview.scrollTop(preview[0].scrollHeight);
|
||||
}
|
||||
else {
|
||||
|
|
|
@ -76,7 +76,7 @@ body {
|
|||
}
|
||||
/* md多空格 */
|
||||
.markdown-body p {
|
||||
margin:10px 0px!important;
|
||||
/* margin:10px 0px!important; */
|
||||
font-size: 16px !important;
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
|
|
@ -492,7 +492,7 @@ function CoderDepot(props){
|
|||
}
|
||||
{
|
||||
checkIfLogin && checkIfLogin()?
|
||||
<a className='newBtn' onClick={()=>eventTrack(`/${owner}/${projectsId}/webIDE/tree/${defaultBranch}`)}>Web IDE <div className='newBtnImg'></div></a>
|
||||
<a className='newBtn' onClick={()=>eventTrack(`/${owner}/${projectsId}/webIDE/tree/${branchName||defaultBranch}`)}>Web IDE <div className='newBtnImg'></div></a>
|
||||
:
|
||||
<a className='newBtn' onClick={()=>{showLoginDialog(`/${owner}/${projectsId}`)}}>Web IDE <div className='newBtnImg'></div></a>
|
||||
}
|
||||
|
|
|
@ -493,7 +493,7 @@ class MessageCount extends Component {
|
|||
</Button>
|
||||
)}
|
||||
|
||||
{operate && (
|
||||
{userLogin && projectDetail && permission && (
|
||||
<Button
|
||||
type="blue"
|
||||
ghost
|
||||
|
|
|
@ -185,6 +185,7 @@ form .ant-cascader-picker, form .ant-select {
|
|||
.linesContent > p{
|
||||
flex:1;
|
||||
word-break: break-all;
|
||||
white-space: pre;
|
||||
}
|
||||
.linesContent .lines{
|
||||
display: flex;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
.CodeMirror-scroll {
|
||||
.CodeMirror .CodeMirror-scroll {
|
||||
overflow: auto !important;
|
||||
margin-bottom: -30px;
|
||||
margin-right: -30px;
|
||||
|
|
Loading…
Reference in New Issue