Minor fixes

This commit is contained in:
barsdeveloper
2022-04-25 18:51:23 +02:00
parent 4b563f023e
commit 1aa4ceb11c
8 changed files with 56 additions and 13 deletions

View File

@@ -42,7 +42,7 @@ export default class NodeTemplate extends SelectableDraggableTemplate {
height="16"
fill="currentColor"
class="ueb-node-expansion-icon"
viewBox="4 2 24 24"
viewBox="4 4 24 24"
>
<path
fill-rule="evenodd"

View File

@@ -1,11 +1,21 @@
// @ts-check
import PinTemplate from "./PinTemplate"
import IInputPinTemplate from "./IInputPinTemplate"
/**
* @typedef {import("../element/PinElement").default} PinElement
*/
export default class RealPinTemplate extends PinTemplate {
export default class RealPinTemplate extends IInputPinTemplate {
/**
* @param {PinElement} pin
*/
acceptInput(pin) {
const value = parseFloat(this.getInput(pin))
pin.entity.DefaultValue = isNaN(value)
? pin.entity.AutogeneratedDefaultValue
: value.toString()
}
}