Mercurial > pub > ImplabJs
diff src/djol/listen.js @ 34:27e8e9e38e07 default tip
Слияние
author | nickolay |
---|---|
date | Wed, 05 Jun 2019 20:44:15 +0300 |
parents | 8af8e840dd49 1dc2fd263b90 |
children |
line wrap: on
line diff
--- a/src/djol/listen.js Wed Jun 05 17:44:17 2019 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -define(["ol"], function(ol) { - - var listen = function(target, event, callback) { - var key = target.on(event, callback); - return { - remove : function() { - ol.Observable.unByKey(key); - } - }; - }; - - listen.once = function(target, event, callback) { - var key = target.once(event, callback); - return { - remove : function() { - ol.Observable.unByKey(key); - } - }; - }; - - return listen; -}); \ No newline at end of file