@flowgram.ai/free-layout-core 0.1.0-alpha.19 → 0.1.0-alpha.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.js +3 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/package.json +9 -9
package/dist/esm/index.js
CHANGED
|
@@ -2138,7 +2138,8 @@ var WorkflowDocument = class extends FlowDocument {
|
|
|
2138
2138
|
*/
|
|
2139
2139
|
_createWorkflowNode(json, options) {
|
|
2140
2140
|
const { parentID, onNodeCreated, onEdgeCreated } = options ?? {};
|
|
2141
|
-
const
|
|
2141
|
+
const existedNode = this.getNode(json.id);
|
|
2142
|
+
const isExistedNode = existedNode && existedNode.flowNodeType === json.type;
|
|
2142
2143
|
const parent = this.getNode(parentID ?? this.root.id) ?? this.root;
|
|
2143
2144
|
const node = this.addNode(
|
|
2144
2145
|
{
|
|
@@ -3662,7 +3663,7 @@ function usePlaygroundReadonlyState(listenChange) {
|
|
|
3662
3663
|
function checkTargetDraggable(el) {
|
|
3663
3664
|
return el && el.tagName !== "INPUT" && el.tagName !== "TEXTAREA" && !el.closest(".flow-canvas-not-draggable");
|
|
3664
3665
|
}
|
|
3665
|
-
var isFirefox = navigator?.userAgent?.includes?.("Firefox");
|
|
3666
|
+
var isFirefox = typeof navigator !== "undefined" && navigator?.userAgent?.includes?.("Firefox");
|
|
3666
3667
|
function useNodeRender(nodeFromProps) {
|
|
3667
3668
|
const node = nodeFromProps || useContext(PlaygroundEntityContext);
|
|
3668
3669
|
const renderData = node.getData(FlowNodeRenderData3);
|