Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Edge Path is not working in svelte recent version from above 4.0.0 to till now #444

Open
IamMathankumar opened this issue Jul 21, 2023 · 5 comments

Comments

@IamMathankumar
Copy link

IamMathankumar commented Jul 21, 2023

First of all thanks for this library it works great. In recent times am facing an issue with custom Edge that not drawn as expected

Here is the Node function:

			<Node let:selected id={"abc"}>
				<div class:selected class="flex space-x-11">
				  <div class="input-anchors flex  flex-col space-y-11" >
					<Anchor bgColor="red" id="data-connection" input />
					<Anchor id="test" multiple input nodeConnect/>
				  </div>
				  <div class="output-anchors flex  flex-col space-y-11">
					<Anchor let:linked let:hovering let:connecting output  edge={EdgePath}  >
					</Anchor>
				  </div>
				</div>
			  </Node>
		</Svelvet>

Used same EdgePath component from sample.

<script>
	import { Edge } from 'svelvet';
</script>

<Edge let:path let:destroy edgeClick="{() => alert('Edge clicked')}" step>
	<path d={path} />
	<button on:click={destroy} slot="label">
		<p>Custom Label</p>
	</button>
</Edge>

<style>
	path {
		stroke: rgb(246, 231, 20);
		stroke-width: 4px;
	}
</style>

Above code is working with Svelte version : 3.54.0
"svelte": "^3.54.0",

Not working after I updgraded to 4.0.0
"svelte": "^4.0.0",
Svelvet version: 8.1.0
"svelvet": "^8.1.0",

@rohanrajpal
Copy link
Contributor

+1, facing the same issue

@rohanrajpal
Copy link
Contributor

Hey @briangregoryholmes do you have any idea why this might be happening? I can open a PR if the fix doesnt involve a big refactor. This is blocking us from upgrading to svelte 4 so would be happy to contribute.

@rohanrajpal
Copy link
Contributor

Heyo @briangregoryholmes @rathna-git is there any new team working on the next version of svelte or existing issues? Curious to know the direction of this project now

@nj-vs-vh
Copy link

nj-vs-vh commented Sep 8, 2023

Hey, I faced the same issue and managed to solve it locally. It seems to be caused by this Svelte update. I have created a draft PR (#474) but will need help from maintainers to prepare it for production.

@rohanrajpal
Copy link
Contributor

thanks to @nj-vs-vh , we have a fix, as a temporary solution until this is merged, folks can use

{
"svelvet": "npm:meetspur-svelvet@^8.1.1"
}

instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants