Security News
NIST Misses 2024 Deadline to Clear NVD Backlog
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
@alilc/g-react-renderer
Advanced tools
鼠标 mousedown 一个 node 节点并且移动的时候,是否可以移动画布上的内容
// 节点的属性
export interface INodeProps {
itemName: string;
itemColor: string;
img: string;
itemDesc?: string;
selected: boolean;
hovered: boolean;
error: boolean;
// 是否可拖拽,默认可拖拽
draggable?: boolean;
}
// 如果想要在某个shape上覆盖 nodeProps: INodeProps 上的 draggable 属性,可以按照如下设置
const DemoNode = (props: INodeProps) => {
return (
<Shape>
<Rect name="border-wrapper" draggable={false} style={{
borderRadius: 4,
}}>
<Text name="border-wrapper-text">内容</Text>
</Rect>
</Shape>
)
}
export default DemoNode;
- 透明度相关属性包括:opacity,fillOpacity,strokeOpacity, 适用的元素:Rect, Image;
- fillOpacity 和 strokeOpacity 的优先级高于 opacity;
- 透明度还需要考虑元素的父子嵌套关系,子元素的透明度 = 父元素的透明度 * 自身透明度,透明度默认值为:globalAlpha,未设置则为 1;
export interface IOpacityStyle {
opacity?: number;
fillOpacity?: number;
strokeOpacity?: number;
}
const DemoNode = (props: INodeProps) => {
return (
<Shape>
<Rect name="border-wrapper" draggable={false} style={{
borderRadius: 4,
opacity: 0.5,
fillOpacity: 0.5,
strokeOpacity: 0.5,
}}>
<Text name="border-wrapper-text">内容</Text>
</Rect>
</Shape>
)
}
FAQs
for Graph Editor Engine
The npm package @alilc/g-react-renderer receives a total of 4 weekly downloads. As such, @alilc/g-react-renderer popularity was classified as not popular.
We found that @alilc/g-react-renderer demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 20 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.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.