Commit eace1413 by lduarte1991

Image Annotation Tool: Fixed Viewport Timeout Issue

parent e80992cc
...@@ -330,9 +330,10 @@ Annotator.Plugin.Share = (function(_super) { ...@@ -330,9 +330,10 @@ Annotator.Plugin.Share = (function(_super) {
} }
}else if(self._isImage(an)){//It is a OpenSeaDragon Annotation }else if(self._isImage(an)){//It is a OpenSeaDragon Annotation
var bounds = new OpenSeadragon.Rect(an.bounds.x, an.bounds.y, an.bounds.width, an.bounds.height); var bounds = new OpenSeadragon.Rect(an.bounds.x, an.bounds.y, an.bounds.width, an.bounds.height);
osda.viewer.viewport.fitBounds(bounds, false); setTimeout(function(){
$('html,body').animate({scrollTop: $("#"+an.target.container).offset().top}, osda.viewer.viewport.fitBounds(bounds, false);
'slow'); $('html,body').animate({scrollTop: $("#"+an.target.container).offset().top},'slow');},250
);
}else{//It is a text }else{//It is a text
self._isImage(an); self._isImage(an);
var hasRanges = typeof an.ranges!='undefined' && typeof an.ranges[0] !='undefined', var hasRanges = typeof an.ranges!='undefined' && typeof an.ranges[0] !='undefined',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment