Opened 10 years ago
Closed 7 years ago
#11262 closed defect (fixed)
Image not displayed correctly in Help Window -> Map View
Reported by: | raykiddy | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 15.10 |
Component: | Core | Version: | |
Keywords: | help svg html | Cc: |
Description (last modified by )
Attachments (1)
Change History (9)
by , 10 years ago
Attachment: | JOSM_Help_View.png added |
---|
comment:1 by , 10 years ago
comment:2 by , 10 years ago
Component: | unspecified → Core |
---|
comment:3 by , 9 years ago
Milestone: | → 15.10 |
---|
For displaying SVG, this might be the way to go: http://stackoverflow.com/a/16073804, override javax.swing.text.html.HTMLEditorKit.HTMLFactory#create
for kind==HTML.Tag.IMG
.
For the correct height, the simplest version would be to drop the width information thus showing the image in full width+height (see below). We also might implement a better computation when considering SVG images.
-
src/org/openstreetmap/josm/tools/WikiReader.java
diff --git a/src/org/openstreetmap/josm/tools/WikiReader.java b/src/org/openstreetmap/josm/tools/WikiReader.java index 6094c40..1246efa 100644
a b protected String readFromTrac(BufferedReader in, URL url) throws IOException { 142 142 // add a border="0" attribute to images, otherwise the internal help browser 143 143 // will render a thick border around images inside an <a> element 144 144 b += line.replaceAll("<img ", "<img border=\"0\" ") 145 .replaceAll("width=\"(\\d+)\"", "") 145 146 .replaceAll("<span class=\"icon\">.</span>", "") 146 147 .replaceAll("href=\"/", "href=\"" + baseurl + "/") 147 148 .replaceAll(" />", ">")
comment:4 by , 9 years ago
Description: | modified (diff) |
---|---|
Keywords: | help svg html added; Help Window removed |
comment:7 by , 7 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
comment:8 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
@anonymous: please don't reopen tickets closed long ago in a previous milestone.
There are also some problems on the help start page (Help) in the JOSM Help Browser