missioncommand / mil-sym-js

(RETIRED) MIL-STD-2525 symbol rendering JavaScript library for modern web applications
Apache License 2.0
76 stars 25 forks source link

MilStdIconRenderer renders a too-large image for some hostile action points #27

Closed eric79 closed 6 years ago

eric79 commented 6 years ago

When drawing the following action points with a hostile affiliation, the image that is returned is larger than it intends to be:

For example, here is what is returned from toDataUrl for Contact Point:

image

img.getImageBounds().width reports that it's 27 pixels wide, but img.getImage().width reports that it's 150 pixels wide (which is true).

As an aside:

  1. It appears that the issue only appears for the hostile affiliation
  2. MilStdSVGRenderer doesn't seem to have the problem.

And by the way ... thanks for making this library available. It's pretty awesome.

michael-spinelli commented 6 years ago

Glad you like it.

What modifiers are you passing into the renderer? I'm having trouble duplicating the issue

eric79 commented 6 years ago

Oh, sorry. Here are the details:

symbolID: GHGPGPPC----**X modifiers: {SIZE: "40", ICON: false, SYMSTD: 1}

michael-spinelli commented 6 years ago

fixed in release v0.3.31

eric79 commented 6 years ago

Woohoo! Thanks!