Class. Web Socket Diagram Server Proxy
protectedcurrentRoot:SModelRoot
Defined in: packages/sprotty/src/model-source/diagram-server.ts:61
DiagramServerProxy.currentRoot
protectedlastSubmittedModelType:string
Defined in: packages/sprotty/src/model-source/diagram-server.ts:66
DiagramServerProxy.lastSubmittedModelType
protectedlogger:ILogger
Defined in: packages/sprotty/src/model-source/diagram-server.ts:56
protectedviewerOptions:ViewerOptions
Defined in: packages/sprotty/src/model-source/model-source.ts:50
DiagramServerProxy.viewerOptions
protectedoptionalwebSocket:WebSocket
Defined in: packages/sprotty/src/model-source/websocket.ts:27
get model():
SModelRoot
Defined in: packages/sprotty/src/model-source/diagram-server.ts:68
SModelRoot
commitModel(
newRoot):SModelRoot|Promise<SModelRoot>
Defined in: packages/sprotty/src/model-source/diagram-server.ts:210
Commit changes from the internal SModel back to the currentModel.
This method is meant to be called only by CommitModelCommand and other commands
that need to feed the current internal model back to the model source. It does
not have any side effects such as triggering layout or bounds computation, as the
internal model is already current. See CommitModelAction for details.
SModelRoot
the new model.
SModelRoot | Promise<SModelRoot>
the previous model.
DiagramServerProxy.commitModel
disconnect():
void
Defined in: packages/sprotty/src/model-source/websocket.ts:39
void
protectedforwardToServer(action):void
Defined in: packages/sprotty/src/model-source/diagram-server.ts:96
Action
void
DiagramServerProxy.forwardToServer
handle(
action):void|Action|ICommand
Defined in: packages/sprotty/src/model-source/diagram-server.ts:89
Action
void | Action | ICommand
protectedhandleComputedBounds(action):boolean
Defined in: packages/sprotty/src/model-source/diagram-server.ts:184
If the server requires to compute a layout, the computed bounds are forwarded. Otherwise they are applied to the current model locally and a model update is triggered.
ComputedBoundsAction
boolean
DiagramServerProxy.handleComputedBounds
protectedhandleExportSvgAction(action):boolean
Defined in: packages/sprotty/src/model-source/diagram-server.ts:200
ExportSvgAction
boolean
DiagramServerProxy.handleExportSvgAction
protectedhandleLocally(action):boolean
Defined in: packages/sprotty/src/model-source/diagram-server.ts:132
Check whether the given action should be handled locally. Returns true if the action should still be sent to the server, and false if it’s only handled locally.
Action
boolean
DiagramServerProxy.handleLocally
protectedhandleRequestModel(action):boolean
Defined in: packages/sprotty/src/model-source/diagram-server.ts:166
RequestModelAction
boolean
DiagramServerProxy.handleRequestModel
protectedhandleServerStateAction(action):boolean
Defined in: packages/sprotty/src/model-source/diagram-server.ts:206
boolean
DiagramServerProxy.handleServerStateAction
initialize(
registry):void
Defined in: packages/sprotty/src/model-source/diagram-server.ts:72
void
listen(
webSocket):void
Defined in: packages/sprotty/src/model-source/websocket.ts:29
WebSocket
void
protectedmessageReceived(data):void
Defined in: packages/sprotty/src/model-source/diagram-server.ts:113
Called when a message is received from the remote diagram server.
any
void
DiagramServerProxy.messageReceived
protectedsendMessage(message):void
Defined in: packages/sprotty/src/model-source/websocket.ts:46
Send a message to the remote diagram server.
ActionMessage
void
DiagramServerProxy.sendMessage
protectedstoreNewModel(action):void
Defined in: packages/sprotty/src/model-source/diagram-server.ts:152
Put the new model contained in the given action into the model storage, if there is any.
Action
void