diff --git a/graphics/core.lua b/graphics/core.lua index b4e1d94..830ca69 100644 --- a/graphics/core.lua +++ b/graphics/core.lua @@ -7,7 +7,7 @@ local flasher = require("graphics.flasher") local core = {} -core.version = "2.2.3" +core.version = "2.2.4" core.flasher = flasher core.events = events diff --git a/graphics/element.lua b/graphics/element.lua index c7cc056..ef05911 100644 --- a/graphics/element.lua +++ b/graphics/element.lua @@ -3,6 +3,7 @@ -- local util = require("scada-common.util") +local log = require("scada-common.log") local core = require("graphics.core") @@ -198,6 +199,9 @@ function element.new(args, child_offset_x, child_offset_y) ---@param offset_y integer y offset for mouse events ---@param next_y integer next line if no y was provided function protected.prepare_template(offset_x, offset_y, next_y) + -- don't auto incrememnt y if inheriting height, that would cause an assertion + next_y = util.trinary(args.height == nil, 1, next_y) + -- record offsets in case there is a reposition self.offset_x = offset_x self.offset_y = offset_y