Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
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
edx
edx-platform
Commits
b6a5bea0
Commit
b6a5bea0
authored
Sep 26, 2014
by
Adam
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5400 from edx/merge-conflicts-release
Merge conflicts release
parents
792c8eaf
01f2f81c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
5 deletions
+10
-5
common/static/js/vendor/ova/OpenSeaDragonAnnotation.js
+10
-5
No files found.
common/static/js/vendor/ova/OpenSeaDragonAnnotation.js
View file @
b6a5bea0
...
...
@@ -581,10 +581,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
// would require changing annotations that were already made, instead we check if
// the id is a substring of the thumbnail, which according to OpenSeaDragon API should be the case.
var
sourceId
=
this
.
viewer
.
source
[
'@id'
];
var
targetThumb
=
an
.
target
.
thumb
;
// code runs on annotation creation before thumbnail is created
var
targetThumb
=
an
.
target
?
an
.
target
.
thumb
:
false
;
if
(
isContainer
)
{
isSource
=
(
targetThumb
.
indexOf
(
sourceId
)
!==
-
1
);
}
// reason why this is okay is that we are trying to ascertain that the annotation
// is related to the image drawn. If thumbnail attribute is empty it means the annotation
// was just created and should still be considered an annotation of this image.
isSource
=
targetThumb
?
(
targetThumb
.
indexOf
(
sourceId
)
!==
-
1
)
:
true
;
}
return
(
isOpenSeaDragon
&&
isContainer
&&
isImage
&&
isRP
&&
isSource
);
},
...
...
@@ -842,13 +847,13 @@ Annotator.Plugin.OpenSeaDragon = (function(_super) {
// Makes sure OSD exists and that annotation is an image annotation
// with a position in the OSD instance
var
isOpenSeaDragon
=
(
typeof
annotator
.
osda
!=
'undefined'
);
var
isContainer
=
(
typeof
an
.
target
!=
'undefined'
&&
an
.
target
.
container
==
this
.
viewer
.
id
);
var
isContainer
=
(
typeof
an
.
target
!=
'undefined'
&&
an
.
target
.
container
==
osda
.
viewer
.
id
);
var
isImage
=
(
typeof
an
.
media
!=
'undefined'
&&
an
.
media
==
'image'
);
var
isRP
=
(
typeof
rp
!=
'undefined'
);
var
isSource
=
false
;
// Double checks that the image being displayed matches the annotations
var
source
=
this
.
viewer
.
source
;
var
source
=
osda
.
viewer
.
source
;
var
tilesUrl
=
typeof
source
.
tilesUrl
!=
'undefined'
?
source
.
tilesUrl
:
''
;
var
functionUrl
=
typeof
source
.
getTileUrl
!=
'undefined'
?
source
.
getTileUrl
:
''
;
var
compareUrl
=
tilesUrl
!=
''
?
tilesUrl
:(
''
+
functionUrl
).
replace
(
/
\s
+/g
,
' '
);
...
...
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