Visualization fix
This commit is contained in:
parent
0658057009
commit
ad5ac9c63e
1 changed files with 4 additions and 2 deletions
|
@ -314,9 +314,11 @@ exports.parse = (config, units) => {
|
|||
|
||||
exports.visualize = (points, units) => {
|
||||
const models = {}
|
||||
x_unit = units.visual_x || (units.u - 1)
|
||||
y_unit = units.visual_y || (units.u - 1)
|
||||
for (const [pname, p] of Object.entries(points)) {
|
||||
const w = (p.meta.width * units.u) - 1
|
||||
const h = (p.meta.height * units.u) - 1
|
||||
const w = p.meta.width * x_unit
|
||||
const h = p.meta.height * y_unit
|
||||
const rect = u.rect(w, h, [-w/2, -h/2])
|
||||
models[pname] = p.position(rect)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue