mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-03-13 11:47:30 +08:00
Required mark for PCG pins
This commit is contained in:
13
dist/css/ueb-style.css
vendored
13
dist/css/ueb-style.css
vendored
@@ -781,6 +781,19 @@ ueb-blueprint[data-scrolling=false][data-selecting=false] .ueb-pin-wrapper:hover
|
||||
background: none !important;
|
||||
}
|
||||
|
||||
.ueb-pin-required-mark {
|
||||
width: 0;
|
||||
}
|
||||
.ueb-pin-required-mark::before {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 6px;
|
||||
height: 4px;
|
||||
background: var(--ueb-pin-color);
|
||||
margin-left: -13px;
|
||||
border-radius: 0 2px 2px 0;
|
||||
}
|
||||
|
||||
.ueb-pin-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
2
dist/css/ueb-style.css.map
vendored
2
dist/css/ueb-style.css.map
vendored
File diff suppressed because one or more lines are too long
2
dist/css/ueb-style.min.css
vendored
2
dist/css/ueb-style.min.css
vendored
File diff suppressed because one or more lines are too long
2
dist/css/ueb-style.min.css.map
vendored
2
dist/css/ueb-style.min.css.map
vendored
File diff suppressed because one or more lines are too long
33
dist/ueblueprint.js
vendored
33
dist/ueblueprint.js
vendored
@@ -5884,13 +5884,9 @@ class PinEntity extends IEntity {
|
||||
}
|
||||
if (this.objectEntity?.isPcg()) {
|
||||
const pcgSuboject = this.objectEntity.getPcgSubobject();
|
||||
const pinObjectReference = this.isInput()
|
||||
? pcgSuboject.InputPins?.valueOf()[this.pinIndex]
|
||||
: pcgSuboject.OutputPins?.valueOf()[this.pinIndex];
|
||||
if (pinObjectReference) {
|
||||
/** @type {ObjectEntity} */
|
||||
const pinObject = pcgSuboject[Configuration.subObjectAttributeNameFromReference(pinObjectReference, true)];
|
||||
let allowedTypes = pinObject.Properties?.AllowedTypes?.toString() ?? "";
|
||||
const pinObject = this.getPinObject(pcgSuboject);
|
||||
if (pinObject) {
|
||||
let allowedTypes = pinObject["Properties"]?.AllowedTypes?.toString() ?? "";
|
||||
if (allowedTypes == "") {
|
||||
allowedTypes = this.PinType.PinCategory ?? "";
|
||||
if (allowedTypes == "") {
|
||||
@@ -5899,8 +5895,8 @@ class PinEntity extends IEntity {
|
||||
}
|
||||
if (allowedTypes) {
|
||||
if (
|
||||
pinObject.Properties.bAllowMultipleData?.valueOf() !== false
|
||||
&& pinObject.Properties.bAllowMultipleConnections?.valueOf() !== false
|
||||
pinObject["Properties"].bAllowMultipleData?.valueOf() !== false
|
||||
&& pinObject["Properties"].bAllowMultipleConnections?.valueOf() !== false
|
||||
) {
|
||||
allowedTypes += "[]";
|
||||
}
|
||||
@@ -6017,6 +6013,17 @@ class PinEntity extends IEntity {
|
||||
return false
|
||||
}
|
||||
|
||||
/** @param {ObjectEntity} pcgSuboject */
|
||||
getPinObject(pcgSuboject) {
|
||||
const pinObjectReference = this.isInput()
|
||||
? pcgSuboject.InputPins?.valueOf()[this.pinIndex]
|
||||
: pcgSuboject.OutputPins?.valueOf()[this.pinIndex];
|
||||
if (pinObjectReference) {
|
||||
/** @type {ObjectEntity} */
|
||||
return pcgSuboject[Configuration.subObjectAttributeNameFromReference(pinObjectReference, true)]
|
||||
}
|
||||
}
|
||||
|
||||
getSubCategory() {
|
||||
return this.PinType.PinSubCategoryObject?.path
|
||||
}
|
||||
@@ -9611,8 +9618,12 @@ class PinTemplate extends ITemplate {
|
||||
${this.isInputRendered() ? this.renderInput() : x``}
|
||||
</div>
|
||||
`;
|
||||
let pcgSubobject = this.element.nodeElement.entity.getPcgSubobject();
|
||||
return x`
|
||||
<div class="ueb-pin-wrapper">
|
||||
${pcgSubobject && this.element.entity.getPinObject(pcgSubobject)?.["Properties"]?.["PinStatus"] == "Required"
|
||||
? x`<div class="ueb-pin-required-mark"></div>`
|
||||
: E}
|
||||
${this.element.isInput() ? x`${icon}${content}` : x`${content}${icon}`}
|
||||
</div>
|
||||
`
|
||||
@@ -9647,13 +9658,13 @@ class PinTemplate extends ITemplate {
|
||||
case "Set": return SVGIcon.setPin
|
||||
case "Map": return SVGIcon.mapPin
|
||||
}
|
||||
if (this.element.entity.PinType.PinCategory?.toString().toLocaleLowerCase() === "delegate") {
|
||||
if (this.element.entity.PinType.PinCategory?.toString().toLocaleLowerCase() == "delegate") {
|
||||
return SVGIcon.delegate
|
||||
}
|
||||
if (this.element.nodeElement?.template instanceof VariableOperationNodeTemplate) {
|
||||
return SVGIcon.operationPin
|
||||
}
|
||||
if (this.element.entity.PinType.PinCategory?.toString().toLocaleLowerCase() === "statictype") {
|
||||
if (this.element.entity.PinType.PinCategory?.toString().toLocaleLowerCase() == "statictype") {
|
||||
return SVGIcon.staticPin
|
||||
}
|
||||
return SVGIcon.genericPin
|
||||
|
||||
6
dist/ueblueprint.min.js
vendored
6
dist/ueblueprint.min.js
vendored
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user