Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mscgenjs

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mscgenjs - npm Package Compare versions

Comparing version 1.10.0 to 1.11.0

8

doc/xu.md

@@ -146,6 +146,8 @@ # Xù - an MscGen super set

(`wordwraparcs`), which is off by default. Text in any box
(`note`, `box`, `rbox` and `abox`) always automatically wraps to fit into
the box.
(`note`, `box`, `rbox` and `abox`) or entity always automatically wraps
to fit into the box.
In addition Xù and MsGenny
Both Xù and MsGenny have options to also switch that off - `wordwrapboxes`
on false makes sure no text in any box gets wrapped. Likewise `wordwrapentities`
on false makes sure no text in entities gets wrapped.

@@ -152,0 +154,0 @@ ### title - for tool tips

@@ -95,3 +95,3 @@ /* istanbul ignore else */

version: "1.10.0",
version: "1.11.0",

@@ -98,0 +98,0 @@ getAllowedValues: function() {

{
"name": "mscgenjs",
"version": "1.10.0",
"version": "1.11.0",
"description": "Implementation of MscGen in JavaScript",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -298,9 +298,36 @@ /* istanbul ignore else */

function sizeEntityBoxToLabel(pLabel, pBBox) {
var lLabelWidth = Math.min(
svgutensils.getBBox(pLabel).width + (4 * constants.LINE_WIDTH),
(pBBox.interEntitySpacing / 3) + pBBox.width
);
if (lLabelWidth >= pBBox.width) {
pBBox.x -= (lLabelWidth - pBBox.width) / 2;
pBBox.width = lLabelWidth;
}
return pBBox;
}
function renderEntity(pEntity, pX, pOptions) {
var lGroup = svgelementfactory.createGroup();
var lBBox = entities.getDims();
var lBBox = _.cloneDeep(entities.getDims());
lBBox.x = pX ? pX : 0;
var lLabel = renderlabels.createLabel(
_.defaults(
pEntity,
{
kind: "entity"
}
),
{
x:lBBox.x,
y:lBBox.height / 2,
width:lBBox.width
},
pOptions
);
lGroup.appendChild(
svgelementfactory.createRect(
lBBox,
sizeEntityBoxToLabel(lLabel, lBBox),
"entity",

@@ -311,18 +338,3 @@ pEntity.linecolor,

);
lGroup.appendChild(
renderlabels.createLabel(
_.defaults(
pEntity,
{
kind: "entity"
}
),
{
x:lBBox.x,
y:lBBox.height / 2,
width:lBBox.width
},
pOptions
)
);
lGroup.appendChild(lLabel);
return lGroup;

@@ -329,0 +341,0 @@ }

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc