This repository was archived by the owner on Apr 2, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +25
-0
lines changed
Expand file tree Collapse file tree 2 files changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -253,6 +253,19 @@ annotorious.Annotorious.prototype.hideSelectionWidget = function(opt_item_url) {
253253 }
254254}
255255
256+ annotorious . Annotorious . prototype . stopSelection = function ( opt_item_url ) {
257+ if ( opt_item_url ) {
258+ var module = this . _getModuleForItemSrc ( opt_item_url ) ;
259+ if ( module )
260+ module . stopSelection ( opt_item_url ) ;
261+ } else {
262+ goog . array . forEach ( this . _modules , function ( module ) {
263+ module . stopSelection ( ) ;
264+ } ) ;
265+ }
266+ }
267+
268+
256269/**
257270 * Highlights the specified annotation.
258271 * @param {annotorious.Annotation } annotation the annotation
Original file line number Diff line number Diff line change @@ -268,6 +268,18 @@ annotorious.mediatypes.Module.prototype.activateSelector = function(opt_item_url
268268 }
269269}
270270
271+ annotorious . mediatypes . Module . prototype . stopSelection = function ( opt_item_url ) {
272+ if ( opt_item_url ) {
273+ var annotator = this . _annotators . get ( opt_item_url ) ;
274+ if ( annotator )
275+ annotator . stopSelection ( ) ;
276+ } else {
277+ goog . array . forEach ( this . _annotators . getValues ( ) , function ( annotator ) {
278+ annotator . stopSelection ( ) ;
279+ } ) ;
280+ }
281+ }
282+
271283/**
272284 * Adds an annotation to an item managed by this module.
273285 * @param {annotorious.Annotation } annotation the annotation
You can’t perform that action at this time.
0 commit comments