diff --git a/loleaflet/src/layer/AnnotationManager.js b/loleaflet/src/layer/AnnotationManager.js index c898b176f..5b3ba541f 100644 --- a/loleaflet/src/layer/AnnotationManager.js +++ b/loleaflet/src/layer/AnnotationManager.js @@ -657,6 +657,16 @@ L.AnnotationManager = L.AnnotationManagerBase.extend({ this._map.sendUnoCommand('.uno:ResolveComment', comment); }, + resolveThread: function (annotation) { + var comment = { + Id: { + type: 'string', + value: annotation._data.id + } + }; + this._map.sendUnoCommand('.uno:ResolveCommentThread', comment); + }, + updateResolvedState: function (annotation) { var threadIndexFirst = this.getRootIndexOf(annotation._data.id); if (this._items[threadIndexFirst]._data.resolved !== annotation._data.resolved) { diff --git a/loleaflet/src/layer/tile/TileLayer.js b/loleaflet/src/layer/tile/TileLayer.js index 6a76f3c07..35849e28f 100644 --- a/loleaflet/src/layer/tile/TileLayer.js +++ b/loleaflet/src/layer/tile/TileLayer.js @@ -256,6 +256,12 @@ L.TileLayer = L.GridLayer.extend({ callback: function (key, options) { that.onAnnotationResolve.call(that, options.$trigger.get(0).annotation); } + }, + resolveThread: this._docType !== 'text' ? undefined : { + name: _('Resolve Thread'), + callback: function (key, options) { + that.onAnnotationResolveThread.call(that, options.$trigger.get(0).annotation); + } } }, events: { diff --git a/loleaflet/src/layer/tile/WriterTileLayer.js b/loleaflet/src/layer/tile/WriterTileLayer.js index 5a120fdb0..223236bd4 100644 --- a/loleaflet/src/layer/tile/WriterTileLayer.js +++ b/loleaflet/src/layer/tile/WriterTileLayer.js @@ -82,6 +82,10 @@ L.WriterTileLayer = L.CanvasTileLayer.extend({ this._annotations.resolve(annotation); }, + onAnnotationResolveThread: function (annotation) { + this._annotations.resolveThread(annotation); + }, + onChangeAccept: function(id) { this._annotations.acceptChange(id); },