Ghost/ghost/admin/lib/koenig-editor/addon/services/koenig-ui.js
Kevin Ansfield c019ef5cb0 Removed prototype button atom
refs https://github.com/TryGhost/Team/issues/931

- prototype button has served it's purpose in answering questions and is no longer being used
- groundwork is left in place for future component-based atoms
2021-07-23 09:21:03 +01:00

23 lines
573 B
JavaScript

import Service from '@ember/service';
import {tracked} from '@glimmer/tracking';
export default class KoenigUiService extends Service {
@tracked captionHasFocus = false;
@tracked inputHasFocus = false;
@tracked isDragging = false;
#focusedCaption = null;
captionGainedFocus(caption) {
this.captionHasFocus = true;
this.#focusedCaption = caption;
}
captionLostFocus(caption) {
if (this.#focusedCaption === caption) {
this.captionHasFocus = false;
this.#focusedCaption = null;
}
}
}