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

bpmn-js

Package Overview
Dependencies
Maintainers
8
Versions
344
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bpmn-js - npm Package Compare versions

Comparing version 17.0.2 to 17.1.0

5

lib/features/context-pad/ContextPadProvider.js

@@ -14,2 +14,3 @@ import {

isExpanded,
isHorizontal,
isEventSubProcess

@@ -316,3 +317,3 @@ } from '../../util/DiUtil';

if (element.height >= 120) {
if (isHorizontal(element) ? element.height >= 120 : element.width >= 120) {
assign(actions, {

@@ -330,3 +331,3 @@ 'lane-divide-two': {

if (element.height >= 180) {
if (isHorizontal(element) ? element.height >= 180 : element.width >= 180) {
assign(actions, {

@@ -333,0 +334,0 @@ 'lane-divide-three': {

38

lib/features/modeling/cmd/SplitLaneHandler.js

@@ -6,2 +6,6 @@ import {

import {
isHorizontal
} from '../../../util/DiUtil';
/**

@@ -49,12 +53,14 @@ * @typedef {import('diagram-js/lib/command/CommandHandler').default} CommandHandler

var newLanesHeight = Math.round(shape.height / newLanesCount);
var isHorizontalLane = isHorizontal(shape);
// Iterate from top to bottom in child lane order,
var laneBaseSize = isHorizontalLane ? shape.height : shape.width;
var newLanesSize = Math.round(laneBaseSize / newLanesCount);
// Iterate from first to last in child lane order,
// resizing existing lanes and creating new ones
// so that they split the parent proportionally.
//
// Due to rounding related errors, the bottom lane
// Due to rounding related errors, the last lane
// needs to take up all the remaining space.
var laneY,
laneHeight,
var laneSize,
laneBounds,

@@ -66,16 +72,19 @@ newLaneAttrs,

laneY = shape.y + idx * newLanesHeight;
// if bottom lane
// if last lane
if (idx === newLanesCount - 1) {
laneHeight = shape.height - (newLanesHeight * idx);
laneSize = laneBaseSize - (newLanesSize * idx);
} else {
laneHeight = newLanesHeight;
laneSize = newLanesSize;
}
laneBounds = {
laneBounds = isHorizontalLane ? {
x: shape.x + LANE_INDENTATION,
y: laneY,
y: shape.y + idx * newLanesSize,
width: shape.width - LANE_INDENTATION,
height: laneHeight
height: laneSize
} : {
x: shape.x + idx * newLanesSize,
y: shape.y + LANE_INDENTATION,
width: laneSize,
height: shape.height - LANE_INDENTATION
};

@@ -91,3 +100,4 @@

newLaneAttrs = {
type: 'bpmn:Lane'
type: 'bpmn:Lane',
isHorizontal: isHorizontalLane
};

@@ -94,0 +104,0 @@

{
"name": "bpmn-js",
"version": "17.0.2",
"version": "17.1.0",
"description": "A bpmn 2.0 toolkit and web modeler",

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

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

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