Narrativeweb: Referenced regions problems (#946)
When image width > 800, the referenced regions are incorrectly placed Fixes #11414
This commit is contained in:
@ -472,8 +472,11 @@ class MediaPages(BasePage):
|
||||
if orig_image_path != newpath:
|
||||
url = self.report.build_url_fname(
|
||||
newpath, None, self.uplink)
|
||||
s_width = 'width: %dpx;' % max_width
|
||||
mediadisplay += Html("a", href=url) + (
|
||||
Html("img", src=url, alt=esc_page_title)
|
||||
Html("img", src=url,
|
||||
style=s_width,
|
||||
alt=esc_page_title)
|
||||
)
|
||||
else:
|
||||
dirname = tempfile.mkdtemp()
|
||||
@ -507,9 +510,11 @@ class MediaPages(BasePage):
|
||||
url = self.report.build_url_fname(newpath,
|
||||
None,
|
||||
self.uplink)
|
||||
s_width = 'width: 48px;'
|
||||
hyper = Html("a", href=url,
|
||||
title=esc_page_title) + (
|
||||
Html("img", src=img_url,
|
||||
style=s_width,
|
||||
alt=esc_page_title)
|
||||
)
|
||||
mediadisplay += hyper
|
||||
@ -521,7 +526,9 @@ class MediaPages(BasePage):
|
||||
summaryarea += mediadisplay
|
||||
url = self.report.build_url_image("document.png",
|
||||
"images", self.uplink)
|
||||
s_width = 'width: 48px;'
|
||||
mediadisplay += Html("img", src=url,
|
||||
style=s_width,
|
||||
alt=esc_page_title,
|
||||
title=esc_page_title)
|
||||
|
||||
|
Reference in New Issue
Block a user