mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-03-12 11:07:40 +08:00
Comment sizes and color fixed
This commit is contained in:
@@ -73,12 +73,9 @@ export default class LinearColorEntity extends IEntity {
|
||||
const r = this.R.value
|
||||
const g = this.G.value
|
||||
const b = this.B.value
|
||||
if (
|
||||
!(Math.abs(r - g) > Number.EPSILON)
|
||||
&& !(Math.abs(r - b) > Number.EPSILON)
|
||||
&& !(Math.abs(g - b) > Number.EPSILON)
|
||||
) {
|
||||
this.V.value = 0
|
||||
if (Utility.approximatelyEqual(r, g) && Utility.approximatelyEqual(r, b) && Utility.approximatelyEqual(g, b)) {
|
||||
this.S.value = 0
|
||||
this.V.value = r
|
||||
return
|
||||
}
|
||||
const max = Math.max(r, g, b)
|
||||
|
||||
@@ -155,8 +155,24 @@ export default class ObjectEntity extends IEntity {
|
||||
this.getType() == Configuration.nodeType.comment ? Configuration.defaultCommentWidth : undefined
|
||||
}
|
||||
|
||||
/** @param {Number} value */
|
||||
setNodeWidth(value) {
|
||||
if (!this.NodeWidth) {
|
||||
this.NodeWidth = new IntegerEntity()
|
||||
}
|
||||
this.NodeWidth.value = value
|
||||
}
|
||||
|
||||
getNodeHeight() {
|
||||
return this.NodeHeight ??
|
||||
this.getType() == Configuration.nodeType.comment ? Configuration.defaultCommentHeight : undefined
|
||||
}
|
||||
|
||||
/** @param {Number} value */
|
||||
setNodeHeight(value) {
|
||||
if (!this.NodeHeight) {
|
||||
this.NodeHeight = new IntegerEntity()
|
||||
}
|
||||
this.NodeHeight.value = value
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user