mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-05-17 10:17:29 +08:00
Comments selectable by header only, links fixes
This commit is contained in:
@@ -11,6 +11,7 @@ import LinearColorEntity from "../entity/LinearColorEntity"
|
||||
export default class CommentNodeTemplate extends IResizeableTemplate {
|
||||
|
||||
#color = LinearColorEntity.getWhite()
|
||||
#selectableAreaHeight = 0
|
||||
|
||||
/** @param {NodeElement} element */
|
||||
constructed(element) {
|
||||
@@ -44,6 +45,13 @@ export default class CommentNodeTemplate extends IResizeableTemplate {
|
||||
`
|
||||
}
|
||||
|
||||
/** @param {Map} changedProperties */
|
||||
firstUpdated(changedProperties) {
|
||||
super.firstUpdated(changedProperties)
|
||||
const bounding = this.getDraggableElement().getBoundingClientRect()
|
||||
this.#selectableAreaHeight = bounding.height
|
||||
}
|
||||
|
||||
manageNodesBind() {
|
||||
let nodes = this.element.blueprint.getNodes()
|
||||
for (let node of nodes) {
|
||||
@@ -83,4 +91,22 @@ export default class CommentNodeTemplate extends IResizeableTemplate {
|
||||
endResize() {
|
||||
this.manageNodesBind()
|
||||
}
|
||||
|
||||
topBoundary(justSelectableArea = false) {
|
||||
return this.element.locationY
|
||||
}
|
||||
|
||||
rightBoundary(justSelectableArea = false) {
|
||||
return this.element.locationX + this.element.sizeX
|
||||
}
|
||||
|
||||
bottomBoundary(justSelectableArea = false) {
|
||||
return justSelectableArea
|
||||
? this.element.locationY + this.#selectableAreaHeight
|
||||
: super.bottomBoundary()
|
||||
}
|
||||
|
||||
leftBoundary(justSelectableArea = false) {
|
||||
return this.element.locationX
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user