I have a question regarding changing my port properties. #2892
Replies: 2 comments 1 reply
-
Hi james-ep01, The I do not completely understand why you are placing the When it comes to the port highlighting issue, my first question is - did you refer to the example in the Ports documentation (https://docs.jointjs.com/learn/features/shapes/elements/ports/#marking-available-magnets)? I am not exactly clear about what you mean about "tracking the user's error" in this context, but is it possible that there is an unhandled error inside your Can you provide a minimal reproducible example of your code which shows these two issues in action? |
Beta Was this translation helpful? Give feedback.
-
Always use setters ( Set port data: element.portProp(portId, 'myData', { a: 1, b: 1 }); Read port data: const portId = cellViewS.findAttribute('port', magnetS);
const port = cellViewS.model.getPort(portId);
console.log(port.myData); // { a: 1, b: 1 } If your code contains any errors, please provide us with a CodePen demonstrating the issue. |
Beta Was this translation helpful? Give feedback.
-
Introduction
I have a question regarding changing my port properties.
I have my own port properties in json as below.
This is my property in portbody.
And I fill in the settings values in these fields. I tried both of the following methods.
1: Change to portPorp
2: Change to direct access
There are two things I want to know.
First question, after changing to direct access in 2, the rendering is not done, so the changed port value in validateConnection of paper is not reflected. Is it because the rendering is not done? So how do I render the port information after changing directly in 2?
Second question, if you change to method 1 using portPorp, i can get the changed port value in validateConnection and track the user's error. However, a strange bug occurs.
The port hover effect stops in the stroked state and a large port is drawn on the paper. There is no code that changed the stroke. I'm uploading the video below. What is the problem?
After this bug occurred, even when I printed the fill color of portBody to the console, the color did not change.
2025-02-27.165146.mp4
Steps to reproduce
No response
Restrictions & Constraints
No response
Does your question relate to JointJS or JointJS+. Select both if applicable.
JointJS, JointJS+
Beta Was this translation helpful? Give feedback.
All reactions