Ghost/ghost/admin/lib/koenig-editor/addon/services/koenig-ui.js
2019-05-01 15:13:49 +01:00

19 lines
437 B
JavaScript

import Service from '@ember/service';
export default Service.extend({
captionHasFocus: false,
isDragging: false,
captionGainedFocus(caption) {
this._focusedCaption = caption;
this.set('captionHasFocus', true);
},
captionLostFocus(caption) {
if (this._focusedCaption === caption) {
this._focusedCaption = null;
this.set('captionHasFocus', false);
}
}
});