Skip to content
Snippets Groups Projects
Commit fee05e3f authored by Piotr Gawron's avatar Piotr Gawron
Browse files

onClear event added

parent 2c44d0ec
No related branches found
No related tags found
1 merge request!39Resolve "'Clear' button function incomplete"
......@@ -31,6 +31,7 @@ function AbstractDbOverlay(params) {
this._elementsByQuery = [];
this._elementsByQuery[""] = [];
this.registerListenerType('onSearch');
this.registerListenerType('onClear');
this.registerListenerType('onTargetVisibilityChange');
this.setQueries([]);
......@@ -178,7 +179,10 @@ AbstractDbOverlay.prototype.searchByEncodedQuery = function(originalQuery, fitBo
};
AbstractDbOverlay.prototype.clear = function() {
return this.searchByQuery("");
var self = this;
return self.searchByQuery("").then(function() {
return self.callListeners('onClear');
});
};
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment