How to use mscgenjs - 1 common examples

To help you get started, we’ve selected a few mscgenjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github lmangani / kibana_diagram / public / diagram_controller.js View on Github external
console.log('mscg ready! script is:', $scope.mscScript)
          } catch (e) {
            $scope.errorCustom('tabifyAggResponse error! ' + e)
          }

          // Prep containers
          var container = document.getElementById(network_id)
          container.style.height = container.getBoundingClientRect().height
          container.height = container.getBoundingClientRect().height
          // Cleanup any existing diagram
          var svg = document.getElementById(svg_id)
          if (svg) svg.remove()

          $scope.initialShows()

          mscgenjs.renderMsc(
		  $scope.mscScript || 'msc {}',
		  {
		    elementId: network_id,
		    inputType: 'xu',
		    width: 'auto',
		    additionalTemplate: $scope.vis.params.diagramStyle || 'classic',
	            mirrorEntitiesOnBottom: $scope.vis.params.mirrorEntitiesOnBottom || true
		  },
		  handleRenderMscResult
          )

          function handleRenderMscResult (pError, pSuccess) {
		  if (pError) { console.log('msc error: ',pError,$scope.mscScript);
		  } else { $scope.doneLoading(); }
          }
        } else {

mscgenjs

Sequence chart rendering library

GPL-3.0
Latest version published 3 months ago

Package Health Score

66 / 100
Full package analysis