leaflet: annotation: new option added to resolve thread
Change-Id: Iba14345c782a6e28003845d238debe2935c54be6
This commit is contained in:
parent
995f454c32
commit
59af024cd4
3 changed files with 20 additions and 0 deletions
|
@ -657,6 +657,16 @@ L.AnnotationManager = L.AnnotationManagerBase.extend({
|
||||||
this._map.sendUnoCommand('.uno:ResolveComment', comment);
|
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) {
|
updateResolvedState: function (annotation) {
|
||||||
var threadIndexFirst = this.getRootIndexOf(annotation._data.id);
|
var threadIndexFirst = this.getRootIndexOf(annotation._data.id);
|
||||||
if (this._items[threadIndexFirst]._data.resolved !== annotation._data.resolved) {
|
if (this._items[threadIndexFirst]._data.resolved !== annotation._data.resolved) {
|
||||||
|
|
|
@ -256,6 +256,12 @@ L.TileLayer = L.GridLayer.extend({
|
||||||
callback: function (key, options) {
|
callback: function (key, options) {
|
||||||
that.onAnnotationResolve.call(that, options.$trigger.get(0).annotation);
|
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: {
|
events: {
|
||||||
|
|
|
@ -82,6 +82,10 @@ L.WriterTileLayer = L.CanvasTileLayer.extend({
|
||||||
this._annotations.resolve(annotation);
|
this._annotations.resolve(annotation);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
onAnnotationResolveThread: function (annotation) {
|
||||||
|
this._annotations.resolveThread(annotation);
|
||||||
|
},
|
||||||
|
|
||||||
onChangeAccept: function(id) {
|
onChangeAccept: function(id) {
|
||||||
this._annotations.acceptChange(id);
|
this._annotations.acceptChange(id);
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue