Skip to content
This repository has been archived by the owner on Apr 2, 2023. It is now read-only.

Commit

Permalink
Minor tweaking to make event naming more consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
Rainer Simon committed Feb 21, 2014
1 parent 3235254 commit 1adf1c0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ annotorious.Editor.prototype.open = function(opt_annotation, opt_event) {
goog.dom.appendChild(field.el, f);
}
});
this._annotator.fireEvent(annotorious.events.EventType.ANNOTATION_EDITOR_SHOWN, opt_annotation);
this._annotator.fireEvent(annotorious.events.EventType.EDITOR_SHOWN, opt_annotation);
}

/**
Expand Down
22 changes: 11 additions & 11 deletions src/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,16 @@ annotorious.events.EventType = {
* The current selection was changed
*/
SELECTION_CHANGED: 'onSelectionChanged',

/**
* The annotation editor was opened. Pass the annotation object if it exists.
*/
EDITOR_SHOWN: 'onEditorShown',

/**
* The annotation popop was opened. Pass the annotation object.
*/
POPUP_SHOWN: 'onPopupShown',

/**
* The annotation popup widget is about to hide
Expand All @@ -129,16 +139,6 @@ annotorious.events.EventType = {
/**
* An existing annotation was updated
*/
ANNOTATION_UPDATED: 'onAnnotationUpdated',

/**
* The annotation editor was opened. Pass the annotation object if it exists.
*/
ANNOTATION_EDITOR_SHOWN: 'onAnnotationEditorShown',

/**
* The annotation popop was opened. Pass the annotation object.
*/
ANNOTATION_POPUP_SHOWN: 'onAnnotationPopupShown'
ANNOTATION_UPDATED: 'onAnnotationUpdated'

};
2 changes: 1 addition & 1 deletion src/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ annotorious.Popup.prototype.show = function(annotation, xy) {

goog.style.setOpacity(this.element, 0.9);
goog.style.setStyle(this.element, 'pointer-events', 'auto');
this._annotator.fireEvent(annotorious.events.EventType.ANNOTATION_POPUP_SHOWN, annotation);
this._annotator.fireEvent(annotorious.events.EventType.POPUP_SHOWN, annotation);
}

/**
Expand Down

0 comments on commit 1adf1c0

Please sign in to comment.