1 ? 'grab' : 'default',
- }}
- onWheel={handleWheel}
- >
- {pageImages[pageId] ? (
- <>
-
![]()
{
+ const isCurrentPage = pageId === currentPage;
+ const pageIndex = pageIds.indexOf(pageId) + 1;
+ const geometryForPage = activeFieldGeometry && activeFieldGeometry.page === pageIndex ? activeFieldGeometry : null;
+
+ return {
+ id: pageId,
+ content: (
+
1 ? 'grab' : 'default',
+ }}
+ onWheel={handleWheel}
+ >
+ {pageImages[pageId] ? (
+
{
logger.error(`Error loading image for page ${pageId}:`, e);
// Fallback image for error state
@@ -1009,26 +1013,16 @@ const VisualEditorModal = ({ visible, onDismiss, jsonData, onChange, isReadOnly,
e.target.src = fallbackImage;
}}
/>
- {activeFieldGeometry && (
-
- )}
- >
- ) : (
-
-
- Loading image...
-
- )}
-
- ),
- }));
+ ) : (
+
+
+ Loading image...
+
+ )}
+
+ ),
+ };
+ });
return (