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
caa20b7a
Commit
caa20b7a
authored
Jan 17, 2015
by
Nick Stenning
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove unused getEndCoords from range.coffee
This is not in upstream and it's not needed any more.
parent
401154b7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
24 deletions
+0
-24
textselection.coffee
h/static/scripts/annotator/plugin/textselection.coffee
+0
-11
range.coffee
h/static/scripts/annotator/range.coffee
+0
-13
No files found.
h/static/scripts/annotator/plugin/textselection.coffee
View file @
caa20b7a
...
...
@@ -100,17 +100,6 @@ class Annotator.Plugin.TextSelection extends Annotator.Plugin
type
:
"text range"
range
:
r
# Do we have valid page coordinates inside the event
# which has triggered this function?
unless
event
.
pageX
# No, we don't. Adding fake coordinates
pos
=
selectedRanges
[
0
].
getEndCoords
()
event
.
pageX
=
pos
.
x
event
.
pageY
=
pos
.
y
#- window.scrollY
@
annotator
.
onSuccessfulSelection
event
else
@
annotator
.
onFailedSelection
event
# Strategies used for creating anchors from saved data
h/static/scripts/annotator/range.coffee
View file @
caa20b7a
...
...
@@ -369,19 +369,6 @@ class Range.NormalizedRange
range
.
setEndAfter
(
@
end
)
range
# Utility function to bottom-right the coordinates of this range,
# by inserting a test element before it, and taking it's pos.
getEndCoords
:
->
me
=
$
this
.
end
# Get the start element
probe
=
$
"<span></span>"
# Prepare an element for probing
probe
.
insertAfter
me
# insert the probe element before the start
pos
=
probe
.
offset
()
# get the position
probe
.
remove
()
# remove the probe, restoring the original state
# return the wanted data
x
:
pos
.
left
y
:
pos
.
top
# Public: A range suitable for storing in local storage or serializing to JSON.
class
Range
.
SerializedRange
...
...
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