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

react-zdog

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-zdog - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

57

dist/index.cjs.js

@@ -191,31 +191,29 @@ 'use strict';

React.useLayoutEffect(function () {
if (parent) {
parent.addChild(node);
if (!parent) return;
parent.addChild(node);
state.current.illu.updateGraph();
return function () {
parent.removeChild(node);
parent.updateFlatGraph();
state.current.illu.updateGraph();
return function () {
parent.removeChild(node);
parent.updateFlatGraph();
state.current.illu.updateGraph();
};
}
};
}, [parent]);
React.useEffect(function () {
if (parent) {
state.current.itemMap[colorId] = node;
if (!parent) return;
state.current.itemMap[colorId] = node;
if (props.onClick) {
state.current.clickEventMap[colorId] = props.onClick;
}
if (props.onClick) {
state.current.clickEventMap[colorId] = props.onClick;
}
if (props.onPointerMove) {
state.current.pointerMoveEventMap[colorId] = props.onPointerMove;
}
if (props.onPointerMove) {
state.current.pointerMoveEventMap[colorId] = props.onPointerMove;
}
if (props.onPointerEnter) {
state.current.pointerEnterEventMap[colorId] = props.onPointerEnter;
}
if (props.onPointerEnter) {
state.current.pointerEnterEventMap[colorId] = props.onPointerEnter;
}
if (props.onPointerLeave) {
state.current.pointerLeaveEventMap[colorId] = props.onPointerLeave;
}
if (props.onPointerLeave) {
state.current.pointerLeaveEventMap[colorId] = props.onPointerLeave;
}

@@ -232,11 +230,10 @@

React.useLayoutEffect(function () {
if (ghostParent) {
ghostParent.addChild(ghost_node);
if (!ghostParent) return;
ghostParent.addChild(ghost_node);
state.current.illu_ghost.updateGraph();
return function () {
ghostParent.removeChild(ghost_node);
ghostParent.updateFlatGraph();
state.current.illu_ghost.updateGraph();
return function () {
ghostParent.removeChild(ghost_node);
ghostParent.updateFlatGraph();
state.current.illu_ghost.updateGraph();
};
}
};
}, [ghostParent]);

@@ -243,0 +240,0 @@ return [React__default.createElement(ghostParentContext.Provider, {

@@ -168,31 +168,29 @@ import Zdog from 'zdog';

useLayoutEffect(() => {
if (parent) {
parent.addChild(node);
if (!parent) return;
parent.addChild(node);
state.current.illu.updateGraph();
return () => {
parent.removeChild(node);
parent.updateFlatGraph();
state.current.illu.updateGraph();
return () => {
parent.removeChild(node);
parent.updateFlatGraph();
state.current.illu.updateGraph();
};
}
};
}, [parent]);
useEffect(() => {
if (parent) {
state.current.itemMap[colorId] = node;
if (!parent) return;
state.current.itemMap[colorId] = node;
if (props.onClick) {
state.current.clickEventMap[colorId] = props.onClick;
}
if (props.onClick) {
state.current.clickEventMap[colorId] = props.onClick;
}
if (props.onPointerMove) {
state.current.pointerMoveEventMap[colorId] = props.onPointerMove;
}
if (props.onPointerMove) {
state.current.pointerMoveEventMap[colorId] = props.onPointerMove;
}
if (props.onPointerEnter) {
state.current.pointerEnterEventMap[colorId] = props.onPointerEnter;
}
if (props.onPointerEnter) {
state.current.pointerEnterEventMap[colorId] = props.onPointerEnter;
}
if (props.onPointerLeave) {
state.current.pointerLeaveEventMap[colorId] = props.onPointerLeave;
}
if (props.onPointerLeave) {
state.current.pointerLeaveEventMap[colorId] = props.onPointerLeave;
}

@@ -209,11 +207,10 @@

useLayoutEffect(() => {
if (ghostParent) {
ghostParent.addChild(ghost_node);
if (!ghostParent) return;
ghostParent.addChild(ghost_node);
state.current.illu_ghost.updateGraph();
return () => {
ghostParent.removeChild(ghost_node);
ghostParent.updateFlatGraph();
state.current.illu_ghost.updateGraph();
return () => {
ghostParent.removeChild(ghost_node);
ghostParent.updateFlatGraph();
state.current.illu_ghost.updateGraph();
};
}
};
}, [ghostParent]);

@@ -220,0 +217,0 @@ return [React.createElement(ghostParentContext.Provider, {

{
"name": "react-zdog",
"version": "1.2.0",
"version": "1.2.1",
"description": "React-fiber renderer for zdog",

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

@@ -93,10 +93,11 @@ import React, {

useLayoutEffect(() => {
if (parent) {
parent.addChild(node)
if (!parent) return
parent.addChild(node)
state.current.illu.updateGraph()
return () => {
parent.removeChild(node)
parent.updateFlatGraph()
state.current.illu.updateGraph()
return () => {
parent.removeChild(node)
parent.updateFlatGraph()
state.current.illu.updateGraph()
}
}

@@ -106,17 +107,17 @@ }, [parent])

useEffect(() => {
if (parent) {
state.current.itemMap[colorId] = node
if (props.onClick) {
state.current.clickEventMap[colorId] = props.onClick
}
if (props.onPointerMove) {
state.current.pointerMoveEventMap[colorId] = props.onPointerMove
}
if (props.onPointerEnter) {
state.current.pointerEnterEventMap[colorId] = props.onPointerEnter
}
if (props.onPointerLeave) {
state.current.pointerLeaveEventMap[colorId] = props.onPointerLeave
}
if (!parent) return
state.current.itemMap[colorId] = node
if (props.onClick) {
state.current.clickEventMap[colorId] = props.onClick
}
if (props.onPointerMove) {
state.current.pointerMoveEventMap[colorId] = props.onPointerMove
}
if (props.onPointerEnter) {
state.current.pointerEnterEventMap[colorId] = props.onPointerEnter
}
if (props.onPointerLeave) {
state.current.pointerLeaveEventMap[colorId] = props.onPointerLeave
}

@@ -133,10 +134,11 @@ return () => {

useLayoutEffect(() => {
if (ghostParent) {
ghostParent.addChild(ghost_node)
if (!ghostParent) return
ghostParent.addChild(ghost_node)
state.current.illu_ghost.updateGraph()
return () => {
ghostParent.removeChild(ghost_node)
ghostParent.updateFlatGraph()
state.current.illu_ghost.updateGraph()
return () => {
ghostParent.removeChild(ghost_node)
ghostParent.updateFlatGraph()
state.current.illu_ghost.updateGraph()
}
}

@@ -143,0 +145,0 @@ }, [ghostParent])

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