@hanica-dwa/sijs-block-diagram-renderer
TypeScript icon, indicating that this package has built-in type declarations

1.3.1 • Public • Published

sijs-block-diagram-renderer

This module provides an example of how to implement a custom render module. In this case the module adds a new diagram type, and 2 new shapes. The Block Diagram Renderer module gets it's data for rendering the different Shapes from the Block Diagram Manipulation module.

Getting started

To use the Block Diagram Render Module the user needs to use the 'registerModule()' function provided by the Diagram Renderer. By registering the module at the Diagram Renderer the user will be able to use all the features provided by the Block Diagram module. After registering the module the Diagram Renderer will make sure all the correct methods from the Block Diagram Renderer are called.

Registering the render module

  newRenderer.registerModule(new BlockDiagramRenderAPI());

Module features

The Block Diagram Render Module uses the same setup as the Diagram Renderer module for rendering shapes. Meaning it creates a SVG element based on the dataObject provided by the manipulation module. The shapes that this module is capable of rendering are 'Block' and 'BlockWithText' shape. This module provides no rendering methods for custom lines.

Developing

This module depends on the DiagramManipulator, DiagramRenderer and BlockDiagramManipulation module.

  1. Install the dependencies.
    npm i
  2. Run the tests.
    npm run test
  3. Build the module.
    npm run build
  4. Publish the module.

Readme

Keywords

none

Package Sidebar

Install

npm i @hanica-dwa/sijs-block-diagram-renderer

Weekly Downloads

2

Version

1.3.1

License

ISC

Unpacked Size

23.4 kB

Total Files

20

Last publish

Collaborators

  • rbrtrbrt
  • raymond.debruine
  • sanderl
  • bartvanderwal
  • blastinvoke
  • jeroenkleingeltink
  • dmvanderuit
  • geert-jan
  • sjoerdhaerkens