@@ -6,7 +6,6 @@ from pyWebLayout.style import Alignment, Font, FontStyle, FontWeight, TextDecora
|
||||
from pyWebLayout.abstract import Word
|
||||
from pyWebLayout.abstract.inline import LinkedWord
|
||||
from pyWebLayout.abstract.functional import Link
|
||||
from .functional import LinkText, ButtonText
|
||||
from PIL import Image, ImageDraw, ImageFont
|
||||
from typing import Tuple, Union, List, Optional, Protocol
|
||||
import numpy as np
|
||||
@@ -395,6 +394,8 @@ class Line(Box):
|
||||
|
||||
# Try to add the full word - create LinkText for LinkedWord, regular Text otherwise
|
||||
if isinstance(word, LinkedWord):
|
||||
# Import here to avoid circular dependency
|
||||
from .functional import LinkText
|
||||
# Create a LinkText which includes the link functionality
|
||||
# LinkText constructor needs: (link, text, font, draw, source, line)
|
||||
# But LinkedWord itself contains the link properties
|
||||
@@ -591,6 +592,9 @@ class Line(Box):
|
||||
int(size[1]) if hasattr(size, '__getitem__') else 0
|
||||
)
|
||||
|
||||
# Import here to avoid circular dependency
|
||||
from .functional import LinkText, ButtonText
|
||||
|
||||
if isinstance(text_obj, LinkText):
|
||||
result = QueryResult(
|
||||
object=text_obj,
|
||||
|
||||
Reference in New Issue
Block a user