
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@logicflow/layout
Advanced tools
layout 扩展包
npm install @logicflow/layout
or
yarn add @logicflow/layout
or
pnpm add @logicflow/layout
import LogicFlow from '@logicflow/core';
import { Dagre } from '@logicflow/layout';
const lf = new LogicFlow({
container: '#app',
plugins: [Dagre]
})
// 基本使用方式 - 无参数
lf.extension.dagre.layout()
// 使用布局参数
lf.extension.dagre.layout({
rankdir: 'LR', // 从坐到右布局
ranksep: 100 // 层级间距
nodesep: 50, // 节点间距
})
参数名 | 类型 | 默认值 | 说明 |
---|---|---|---|
rankdir | string | 'LR' | 布局方向,'LR'(左到右), 'TB'(上到下), 'BT'(下到上), 'RL'(右到左) |
align | string | 'UL' | 节点对齐方式,'UL'(上左), 'UR'(上右), 'DL'(下左), 'DR'(下右) |
nodesep | number | 100 | 节点间的水平间距(像素) |
ranksep | number | 150 | 层级间的垂直间距(像素) |
marginx | number | 120 | 图的水平边距(像素) |
marginy | number | 120 | 图的垂直边距(像素) |
ranker | string | 'tight-tree' | 排名算法,'network-simplex', 'tight-tree', 'longest-path' |
edgesep | number | 10 | 边之间的水平间距(像素) |
acyclicer | string | undefined | 如果设置为'greedy',使用贪心算法查找反馈弧集,用于使图变为无环图 |
isDefaultAnchor | boolean | false | 是否是系统默认锚点(默认上下左右4个锚点),当为true时会自动调整连线的路径 |
lf.extension.dagre.layout({
rankdir: 'LR' // 默认值
})
lf.extension.dagre.layout({
rankdir: 'TB'
})
lf.extension.dagre.layout({
rankdir: 'TB',
isDefaultAnchor: true // 调整连线锚点
})
FAQs
LogicFlow layout
The npm package @logicflow/layout receives a total of 160 weekly downloads. As such, @logicflow/layout popularity was classified as not popular.
We found that @logicflow/layout demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.