UNPKG

devexpress-richedit

Version:

DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.

35 lines (34 loc) 894 B
import { EventDispatcher } from '../../utils/event-dispatcher'; export class BaseVisualizer { onChanged = new EventDispatcher(); control; pageIndex; bounds; tip; isTextBox; isAnchoredObject; rotation; constructor(control) { this.control = control; this.reset(); } closeDocument() { this.reset(); this.raiseHide(); } reset() { this.pageIndex = -1; this.bounds = null; this.tip = null; } hide() { this.reset(); this.raiseHide(); } raiseShow() { this.onChanged.listeners.forEach(listener => listener.NotifyShow(this.pageIndex, this.bounds, this.tip, this.isTextBox, this.isAnchoredObject, this.rotation)); } raiseHide() { this.onChanged.listeners.forEach(listener => listener.NotifyHide()); } }