Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
coopwire-hypothesis
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
孙灵跃 Leon Sun
coopwire-hypothesis
Commits
f8f24706
Commit
f8f24706
authored
Nov 02, 2022
by
Robert Knight
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a couple of notes in comments
These address a couple of issues raised in code review.
parent
1f6ea342
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
0 deletions
+3
-0
annotation-metadata.js
src/sidebar/helpers/annotation-metadata.js
+2
-0
thread-sorters.js
src/sidebar/helpers/thread-sorters.js
+1
-0
No files found.
src/sidebar/helpers/annotation-metadata.js
View file @
f8f24706
...
...
@@ -322,6 +322,8 @@ export function location(annotation) {
let
cfi
;
let
position
;
// nb. We ignore the possibility of an annotation having multiple targets here.
// h and the client only support one.
for
(
const
selector
of
targets
[
0
]?.
selector
??
[])
{
if
(
selector
.
type
===
'TextPositionSelector'
)
{
position
=
selector
.
start
;
...
...
src/sidebar/helpers/thread-sorters.js
View file @
f8f24706
...
...
@@ -96,6 +96,7 @@ export const sorters = {
if
(
aLocation
.
cfi
&&
bLocation
.
cfi
)
{
const
cfiResult
=
compareCFIs
(
aLocation
.
cfi
,
bLocation
.
cfi
);
if
(
cfiResult
!==
0
)
{
// Annotations are in different chapters.
return
Math
.
sign
(
cfiResult
);
}
}
else
if
(
aLocation
.
cfi
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment