Why do I have to select the inspector twice to change the object label? #2841
Unanswered
james-ep01
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Introduction
Change object label when inspector load is complete and when changed
When changing a field in the inspector, the label of the object needs to be changed twice.
2024-12-22.090058.mp4
If you look closely at the video, the value remains the same when i change it the first time in the inspector, and i have to select the same value twice to maintain the inspector.
my code :
getFieldValue: function( attribute , type , inspector ) {
var data_attr = $(attribute).attr('data-attribute');
if( data_attr == 'spec/normal/rated_voltage' ){
this.cell.attr({ 'label_spec_1': {text: $(attribute).text() } } );
}else if( data_attr == 'spec/normal/rated_current' ){
this.cell.attr({ 'label_spec_2': {text: $(attribute).text() } } );
}
},
What could be the problem?
And the second question...
How can I get the value of the initial inspector and set the label of the object?
Steps to reproduce
No response
Restrictions & Constraints
No response
Does your question relate to JointJS or JointJS+. Select both if applicable.
JointJS+
Beta Was this translation helpful? Give feedback.
All reactions