mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-06-17 18:03:17 +08:00
Details fixed
This commit is contained in:
6
dist/ueblueprint.js
vendored
6
dist/ueblueprint.js
vendored
@@ -2794,6 +2794,8 @@ class IMouseClickDrag extends IPointing {
|
|||||||
this.#movementListenedElement.addEventListener("mousemove", this.#mouseStartedMovingHandler);
|
this.#movementListenedElement.addEventListener("mousemove", this.#mouseStartedMovingHandler);
|
||||||
document.addEventListener("mouseup", this.#mouseUpHandler);
|
document.addEventListener("mouseup", this.#mouseUpHandler);
|
||||||
this.clickedPosition = this.locationFromEvent(e);
|
this.clickedPosition = this.locationFromEvent(e);
|
||||||
|
this.blueprint.mousePosition[0] = this.clickedPosition[0];
|
||||||
|
this.blueprint.mousePosition[1] = this.clickedPosition[1];
|
||||||
if (this.target instanceof IDraggableElement) {
|
if (this.target instanceof IDraggableElement) {
|
||||||
this.clickedOffset = [
|
this.clickedOffset = [
|
||||||
this.clickedPosition[0] - this.target.locationX,
|
this.clickedPosition[0] - this.target.locationX,
|
||||||
@@ -3846,7 +3848,7 @@ class PinTemplate extends ITemplate {
|
|||||||
const content = $`
|
const content = $`
|
||||||
<div class="ueb-pin-content">
|
<div class="ueb-pin-content">
|
||||||
<span class="ueb-pin-name ">${this.element.getPinDisplayName()}</span>
|
<span class="ueb-pin-name ">${this.element.getPinDisplayName()}</span>
|
||||||
${this.element.isInput() ? this.renderInput() : w}
|
${this.element.isInput() && !this.element.entity.bDefaultValueIsIgnored ? this.renderInput() : $``}
|
||||||
</div>
|
</div>
|
||||||
`;
|
`;
|
||||||
return $`
|
return $`
|
||||||
@@ -3868,7 +3870,7 @@ class PinTemplate extends ITemplate {
|
|||||||
|
|
||||||
/** @returns {TemplateResult | symbol} */
|
/** @returns {TemplateResult | symbol} */
|
||||||
renderInput() {
|
renderInput() {
|
||||||
return w
|
return $``
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @param {Map} changedProperties */
|
/** @param {Map} changedProperties */
|
||||||
|
|||||||
10
dist/ueblueprint.min.js
vendored
10
dist/ueblueprint.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -22,6 +22,8 @@ export default class IMouseClick extends IPointing {
|
|||||||
// Attach the listeners
|
// Attach the listeners
|
||||||
document.addEventListener("mouseup", this.#mouseUpHandler)
|
document.addEventListener("mouseup", this.#mouseUpHandler)
|
||||||
this.clickedPosition = this.locationFromEvent(e)
|
this.clickedPosition = this.locationFromEvent(e)
|
||||||
|
this.blueprint.mousePosition[0] = this.clickedPosition[0]
|
||||||
|
this.blueprint.mousePosition[1] = this.clickedPosition[1]
|
||||||
this.clicked(this.clickedPosition)
|
this.clicked(this.clickedPosition)
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
|
|||||||
@@ -29,6 +29,8 @@ export default class IMouseClickDrag extends IPointing {
|
|||||||
this.#movementListenedElement.addEventListener("mousemove", this.#mouseStartedMovingHandler)
|
this.#movementListenedElement.addEventListener("mousemove", this.#mouseStartedMovingHandler)
|
||||||
document.addEventListener("mouseup", this.#mouseUpHandler)
|
document.addEventListener("mouseup", this.#mouseUpHandler)
|
||||||
this.clickedPosition = this.locationFromEvent(e)
|
this.clickedPosition = this.locationFromEvent(e)
|
||||||
|
this.blueprint.mousePosition[0] = this.clickedPosition[0]
|
||||||
|
this.blueprint.mousePosition[1] = this.clickedPosition[1]
|
||||||
if (this.target instanceof IDraggableElement) {
|
if (this.target instanceof IDraggableElement) {
|
||||||
this.clickedOffset = [
|
this.clickedOffset = [
|
||||||
this.clickedPosition[0] - this.target.locationX,
|
this.clickedPosition[0] - this.target.locationX,
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ export default class PinTemplate extends ITemplate {
|
|||||||
const content = html`
|
const content = html`
|
||||||
<div class="ueb-pin-content">
|
<div class="ueb-pin-content">
|
||||||
<span class="ueb-pin-name ">${this.element.getPinDisplayName()}</span>
|
<span class="ueb-pin-name ">${this.element.getPinDisplayName()}</span>
|
||||||
${this.element.isInput() ? this.renderInput() : nothing}
|
${this.element.isInput() && !this.element.entity.bDefaultValueIsIgnored ? this.renderInput() : html``}
|
||||||
</div>
|
</div>
|
||||||
`
|
`
|
||||||
return html`
|
return html`
|
||||||
@@ -70,7 +70,7 @@ export default class PinTemplate extends ITemplate {
|
|||||||
|
|
||||||
/** @returns {TemplateResult | symbol} */
|
/** @returns {TemplateResult | symbol} */
|
||||||
renderInput() {
|
renderInput() {
|
||||||
return nothing
|
return html``
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @param {Map} changedProperties */
|
/** @param {Map} changedProperties */
|
||||||
|
|||||||
Reference in New Issue
Block a user