1
0

(fix) allow mirroring around origin

This commit is contained in:
torik42 2022-01-13 00:25:49 +01:00 committed by Bán Dénes
parent 1da986e609
commit 17dc5ab169

View File

@ -329,7 +329,7 @@ exports.parse = (config, units) => {
// per-zone mirroring for the new keys
const axis = parse_axis(mirror, `points.zones.${zone_name}.mirror`, points, units)
if (axis) {
if (axis !== undefined) {
const mirrored_points = {}
for (const new_point of Object.values(new_points)) {
const [mname, mp] = perform_mirror(new_point, axis)
@ -352,7 +352,7 @@ exports.parse = (config, units) => {
const global_axis = parse_axis(global_mirror, `points.mirror`, points, units)
const global_mirrored_points = {}
for (const point of Object.values(points)) {
if (global_axis && point.mirrored === undefined) {
if (global_axis !== undefined && point.mirrored === undefined) {
const [mname, mp] = perform_mirror(point, global_axis)
if (mp) {
global_mirrored_points[mname] = mp