getService

returns a service available for Diagram Editor

object getService(string service);
servicestringthe service name
objectthe object with the service methods

Example

const local = $$("editor").getService("local");

Details

Services are major blocks of inner logic of the widget. Their methods can be called directly as well as customized.

Diagram Editor has access to the following services:

  • "Local" - inits a collection of shapes and provides access to it
  • "Styles" - stores shape styles and provides access to them
  • "History" - handles the "undo-redo" functionality.
Back to top