-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Addresses #139 in the revised selection model
- Loading branch information
Showing
1 changed file
with
2 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -117,6 +117,8 @@ export const SelectionHandler = ( | |
store.deleteAnnotation(currentTarget.annotation); | ||
} | ||
|
||
currentTarget = undefined; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
rsimon
Author
Member
|
||
|
||
return; | ||
} | ||
|
||
|
@@ -144,21 +146,7 @@ export const SelectionHandler = ( | |
// being edited. But it will typcially be the case on mobile! | ||
if (store.getAnnotation(currentTarget.annotation)) { | ||
store.updateTarget(currentTarget, Origin.LOCAL); | ||
} /* else { | ||
// Proper lifecycle management: clear selection first... | ||
selection.clear(); | ||
// ...then add annotation to store... | ||
store.addAnnotation({ | ||
id: currentTarget.annotation, | ||
bodies: [], | ||
target: currentTarget | ||
}); | ||
// ...then make the new annotation the current selection | ||
selection.userSelect(currentTarget.annotation, lastDownEvent); | ||
} | ||
*/ | ||
}); | ||
|
||
/** | ||
|
The
currentTarget
shouldn't be dismissed on the selection collapse, that will break the repeated mouse selection. See - #140 (comment)