mirror of
https://github.com/barsdeveloper/ueblueprint.git
synced 2026-02-13 00:24:48 +08:00
Further scale correction fixes
This commit is contained in:
6
dist/ueblueprint.js
vendored
6
dist/ueblueprint.js
vendored
@@ -3142,9 +3142,10 @@ class IDraggableElement extends IElement {
|
||||
}
|
||||
|
||||
computeSizes() {
|
||||
const scaleCorrection = 1 / this.blueprint.getScale();
|
||||
const bounding = this.getBoundingClientRect();
|
||||
this.sizeX = bounding.width;
|
||||
this.sizeY = bounding.height;
|
||||
this.sizeX = bounding.width * scaleCorrection;
|
||||
this.sizeY = bounding.height * scaleCorrection;
|
||||
}
|
||||
|
||||
/** @param {Map} changedProperties */
|
||||
@@ -6251,7 +6252,6 @@ class Blueprint extends IElement {
|
||||
waitingExpandUpdate = false
|
||||
/** @param {NodeElement} node */
|
||||
nodeBoundariesSupplier = node => {
|
||||
this.nodesContainerElement.getBoundingClientRect();
|
||||
return /** @type {BoundariesInfo} */ {
|
||||
primaryInf: node.leftBoundary(),
|
||||
primarySup: node.rightBoundary(),
|
||||
|
||||
6
dist/ueblueprint.min.js
vendored
6
dist/ueblueprint.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -100,7 +100,6 @@ export default class Blueprint extends IElement {
|
||||
waitingExpandUpdate = false
|
||||
/** @param {NodeElement} node */
|
||||
nodeBoundariesSupplier = node => {
|
||||
let gridRect = this.nodesContainerElement.getBoundingClientRect()
|
||||
return /** @type {BoundariesInfo} */ {
|
||||
primaryInf: node.leftBoundary(),
|
||||
primarySup: node.rightBoundary(),
|
||||
|
||||
@@ -49,9 +49,10 @@ export default class IDraggableElement extends IElement {
|
||||
}
|
||||
|
||||
computeSizes() {
|
||||
const scaleCorrection = 1 / this.blueprint.getScale()
|
||||
const bounding = this.getBoundingClientRect()
|
||||
this.sizeX = bounding.width
|
||||
this.sizeY = bounding.height
|
||||
this.sizeX = bounding.width * scaleCorrection
|
||||
this.sizeY = bounding.height * scaleCorrection
|
||||
}
|
||||
|
||||
/** @param {Map} changedProperties */
|
||||
|
||||
Reference in New Issue
Block a user