Open JirkaDellOro opened 2 months ago
You need to provide "String" with a capital "S" in the AttributeTypes:
public getMutatorAttributeTypes(_mutator: Mutator): MutatorAttributeTypes {
let types: MutatorAttributeTypes = super.getMutatorAttributeTypes(_mutator);
types.nameChildToConnect = "String";
return types;
}
This because the CustomElementTextInput
gets registered for String.name
.
However we now have other options available to do this: using the @type(Node)
decorator it is possibile to tell the editor that a Node
can be dropped directly on a property. As of now this doesn't work with JavaScript #privateField and the serialization is rather messy.
I am also thinking if it would be better for MutatorAttributeTypes to store the classes (constructors) rather than a string i.e.:
export interface MutatorAttributeTypes {
[attribute: string]: string | Object;
}
to:
export interface MutatorAttributeTypes {
[attribute: string]: Function | Object;
}
This would align it with the new MetaAttributeTypes
.
Joints use the attribute nameChildToConnect, which is undefined by default and can be typed by a creator in the editor. This attribute doesn't show anymore in the generated user interface. The commit that introduced the problem is
Date: Mon Jul 29 2024 14:17:23 GMT+0200 (Central European Summer Time)
I was able to make it show defining getAttributeTypes in Joint and it shows "Drop your string here...", but the element can't be changed.