This commit is contained in:
@@ -16,6 +16,7 @@ from dataclasses import dataclass
|
||||
from pyWebLayout.core.base import Renderable, Queriable
|
||||
from pyWebLayout.concrete.box import Box
|
||||
from pyWebLayout.abstract.block import Table, TableRow, TableCell, Paragraph, Heading, Image as AbstractImage
|
||||
from pyWebLayout.abstract.interactive_image import InteractiveImage
|
||||
from pyWebLayout.style import Font, Alignment
|
||||
|
||||
|
||||
@@ -220,6 +221,13 @@ class TableCellRenderer(Box):
|
||||
text_y = y + (new_height - 12) // 2
|
||||
self._draw.text((text_x, text_y), text, fill=(100, 100, 100), font=small_font)
|
||||
|
||||
# Set bounds on InteractiveImage objects for tap detection
|
||||
if isinstance(image_block, InteractiveImage):
|
||||
image_block.set_rendered_bounds(
|
||||
origin=(img_x, y),
|
||||
size=(new_width, new_height)
|
||||
)
|
||||
|
||||
return y + new_height + 5 # Add some spacing after image
|
||||
|
||||
except Exception as e:
|
||||
|
||||
Reference in New Issue
Block a user