Opened 9 years ago

Closed 6 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 Don-vip)

The image at the start of this Help information is not being displayed correctly. Either the image is bad, or it is being set to the wrong height.

Attachments (1)

JOSM_Help_View.png (52.0 KB) - added by raykiddy 9 years ago.

Download all attachments as: .zip

Change History (9)

Changed 9 years ago by raykiddy

Attachment: JOSM_Help_View.png added

comment:1 Changed 9 years ago by Klumbumbus

There are also some problems on the help start page (Help) in the JOSM Help Browser

  • icons with wrong aspect ratio (same problem like OP)
  • svg do not work at all

comment:2 Changed 9 years ago by Don-vip

Component: unspecifiedCore

comment:3 Changed 8 years ago by simon04

Milestone: 15.10

For displaying SVG, this might be the way to go:, 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/

    diff --git a/src/org/openstreetmap/josm/tools/ b/src/org/openstreetmap/josm/tools/
    index 6094c40..1246efa 100644
    a b protected String readFromTrac(BufferedReader in, URL url) throws IOException { 
    142142                // add a border="0" attribute to images, otherwise the internal help browser
    143143                // will render a thick  border around images inside an <a> element
    144144                b += line.replaceAll("<img ", "<img border=\"0\" ")
     145                         .replaceAll("width=\"(\\d+)\"", "")
    145146                         .replaceAll("<span class=\"icon\">.</span>", "")
    146147                         .replaceAll("href=\"/", "href=\"" + baseurl + "/")
    147148                         .replaceAll(" />", ">")

comment:4 Changed 8 years ago by Don-vip

Description: modified (diff)
Keywords: help svg html added; Help Window removed

comment:5 Changed 8 years ago by Don-vip

Resolution: fixed
Status: newclosed

In 8933/josm:

fix #11262 - Images not displayed correctly in Help Browser

comment:6 Changed 6 years ago by stoecker

See #15864 for a regression due to this.

Last edited 6 years ago by stoecker (previous) (diff)

comment:7 Changed 6 years ago by anonymous

Resolution: fixed
Status: closedreopened

comment:8 Changed 6 years ago by Don-vip

Resolution: fixed
Status: reopenedclosed

@anonymous: please don't reopen tickets closed long ago in a previous milestone.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.