@kieler/klighd-core
Version:
Core KLighD diagram visualization with Sprotty
49 lines • 2.52 kB
TypeScript
import { ActionHandlerRegistry, DiagramServerProxy, ICommand } from 'sprotty';
import { Action, ActionMessage, ComputedBoundsAction, IModelLayoutEngine, RequestModelAction, ViewportResult } from 'sprotty-protocol';
import { CheckImagesAction, KlighdExportSvgAction, StoreImagesAction } from './actions/actions';
import { RequestDiagramPieceAction } from './diagram-pieces/actions';
import { IDiagramPieceRequestManager } from './diagram-pieces/diagram-piece-request-manager';
import { RequestKlighdPopupModelAction } from './hover/hover';
import { Connection } from './services';
/**
* This class extends {@link DiagramServerProxy} to handle different `klighd-core` specific
* actions and forward them to the server is required.
*/
export declare class KlighdDiagramServer extends DiagramServerProxy {
/** Generic connection to the server used to send and receive actions. */
private _connection;
childrenToRequestQueue: IDiagramPieceRequestManager;
private sessionStorage;
private popupModelProvider;
private preferencesRegistry;
private renderOptionsRegistry;
private bookmarkRegistry;
protected layoutEngine?: IModelLayoutEngine;
constructor(connection: Connection);
protected sendMessage(message: ActionMessage): void;
messageReceived(message: ActionMessage): void;
handleLocally(action: Action): boolean;
protected handleExportSvgAction(action: KlighdExportSvgAction): boolean;
initialize(registry: ActionHandlerRegistry): void;
handle(action: Action): void | ICommand | Action;
handleCheckImages(action: CheckImagesAction): void;
handleStoreImages(action: StoreImagesAction): void;
/**
* Converts the representation of the image data into a single string for identification in sessionStorage.
*
* @param bundleName The bundle name of the image.
* @param imagePath The image path of the image.
*/
private static imageToSessionStorageString;
/**
* Handles Popup Requests because the action requires the currentRoot,
* which is stored as a protected property in the super class.
*/
handleRequestKlighdPopupModel(action: RequestKlighdPopupModelAction): boolean;
handleRequestModel(action: RequestModelAction): boolean;
handleComputedBounds(action: ComputedBoundsAction): boolean;
private doSubmitModel;
handleRequestDiagramPiece(action: RequestDiagramPieceAction): void;
handleViewportResult(action: ViewportResult): void;
}
//# sourceMappingURL=diagram-server.d.ts.map