lib/dedalus/elements/image_grid.rb in dedalus-0.2.19 vs lib/dedalus/elements/image_grid.rb in dedalus-0.2.20

- old
+ new

@@ -1,10 +1,10 @@ module Dedalus module Elements class ImageGrid < Dedalus::Molecule attr_accessor :grid, :tiles_path, :tile_width, :tile_height, :tile_class - attr_accessor :scale + attr_accessor :scale, :redraw_tiles def show if grid grid.map do |row_elements| row_elements.map do |grid_value| @@ -27,10 +27,14 @@ def scale @scale ||= 1.0 end def record? - grid && !grid.empty? + (grid && !grid.empty?) + end + + def rerecord? + redraw_tiles end def width if grid && grid.first grid.first.length * tile_width * scale