mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-15 18:56:22 +00:00
improve line anchors placement
This commit is contained in:
@@ -148,7 +148,7 @@ export default class MarkdownPreview extends React.Component {
|
||||
let row = parseInt(lineAnchor.getAttribute('data-key'))
|
||||
if (row > targetRow) {
|
||||
let targetAnchor = lineAnchors[index - 1]
|
||||
this.getWindow().scrollTo(0, targetAnchor.offsetTop)
|
||||
targetAnchor != null && this.getWindow().scrollTo(0, targetAnchor.offsetTop)
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
@@ -105,9 +105,10 @@ a
|
||||
&.lineAnchor
|
||||
padding 0
|
||||
margin 0
|
||||
display block
|
||||
display inline-block
|
||||
font-size 0
|
||||
height 0
|
||||
width 0
|
||||
hr
|
||||
border-top none
|
||||
border-bottom solid 1px borderColor
|
||||
|
||||
Reference in New Issue
Block a user