Skip to content
This repository was archived by the owner on Sep 8, 2020. It is now read-only.

add changeAnnotation listener #126

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
check onChangeAnnotation cb isFunction
Kroid committed Sep 28, 2015
commit 8ccefe7d6122151d06b4cd13de21a2224e5bea0c
4 changes: 3 additions & 1 deletion src/ui-ace.js
Original file line number Diff line number Diff line change
@@ -255,7 +255,9 @@ angular.module('ui.ace', [])
*/
onChangeAnnotation: function (callback) {
return function () {
callback(session.getAnnotations());
if (angular.isFunction(callback)) {
callback(session.getAnnotations());
}
};
},
/**