1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

update NoteDetail design

This commit is contained in:
Dick Choi
2016-10-14 04:00:59 +09:00
parent 8f0789bc6d
commit fdd0c84441
14 changed files with 392 additions and 194 deletions

View File

@@ -81,13 +81,14 @@ class NoteList extends React.Component {
}
// Auto scroll
if (_.isString(location.query.key) && prevProps.location.query.key !== location.query.key) {
if (_.isString(location.query.key) && prevProps.location.query.key === location.query.key) {
let targetIndex = _.findIndex(this.notes, (note) => {
return note != null && note.storage + '-' + note.key === location.query.key
})
if (targetIndex > -1) {
let list = this.refs.list
let item = list.childNodes[targetIndex]
if (item == null) return false
let overflowBelow = item.offsetTop + item.clientHeight - list.clientHeight - list.scrollTop > 0