do not group annotations by rows since whole array is replaced every time
This commit is contained in:
parent
d03f2ae38b
commit
82550104db
2 changed files with 20 additions and 31 deletions
|
|
@ -752,15 +752,7 @@ var EditSession = function(text, mode) {
|
|||
* Sets annotations for the `EditSession`. This functions emits the `'changeAnnotation'` event.
|
||||
**/
|
||||
this.setAnnotations = function(annotations) {
|
||||
this.$annotations = {};
|
||||
for (var i=0; i<annotations.length; i++) {
|
||||
var annotation = annotations[i];
|
||||
var row = annotation.row;
|
||||
if (this.$annotations[row])
|
||||
this.$annotations[row].push(annotation);
|
||||
else
|
||||
this.$annotations[row] = [annotation];
|
||||
}
|
||||
this.$annotations = annotations;
|
||||
this._emit("changeAnnotation", {});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue