Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add close method and document public documentsMain methods
Signed-off-by: Julius Härtl <jus@bitgrid.net>
  • Loading branch information
juliushaertl committed Nov 4, 2020
1 parent 204d394 commit 81f148d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/document.js
Expand Up @@ -560,13 +560,32 @@ const documentsMain = {
$('#loleafletframe').focus()
},

/**
* Called by mobile clients to properly end the COOL session
*
* @public
*/
close: function() {
documentsMain.onClose()
},

/**
* Called by mobile clients post a selected graphic to COOL
*
* @public
*/
postAsset: function(filename, url) {
PostMessages.sendWOPIPostMessage('loolframe', 'Action_InsertGraphic', {
filename: filename,
url: url
})
},

/**
* Called by mobile clients to indicate that their app got back to an active state
*
* @public
*/
postGrabFocus: function() {
PostMessages.sendWOPIPostMessage('loolframe', 'Grab_Focus')
}
Expand Down

0 comments on commit 81f148d

Please sign in to comment.