How to use the mscgenjs/dist/webpack-issue-5316-workaround.renderMsc function in mscgenjs

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 4 months ago

Package Health Score

68 / 100
Full package analysis