canonn-science / CanonnED3D-Map

All Sites Map
MIT License
8 stars 8 forks source link

Incorrect canvas height value #22

Closed kam1sh closed 4 years ago

kam1sh commented 4 years ago

Hi! I'm working on integrating your map sources (with copyrights, of course!) into one web site, and right now I'm facing some problems with map <canvas> element. If you help us, I'm sure we could donate something to Canonn...

Expected Behavior

Map should take up all space available.

Current Behavior

Map canvas has incorrect height value:

<canvas width="1918" height="0" style="width: 1918px; height: 0px; z-index: 5;"></canvas>

As a result, map has incorrect position and size on page:

image

Possible Solution

???

Steps to Reproduce (for bugs)

I have an example repository that illustrates issue: https://github.com/kam1sh/kvision-sandbox/tree/ed3dmap/src/main/resources

(Before it was writte in KVision (Kotlin/JS web framework), but I managed to get it working only on plain HTML/JS/CSS)

Context

I want to have Elite Dangerous 3D map with our waypoints (fleet carriers, thargoids NHSS, faction objectives etc) on our web site.

Your Environment

Thank you. Igor

derrickmehaffy commented 4 years ago

Hi @kam1sh we didn't build ED3D and are only using it to run the maps. You will want to check with https://github.com/gbiobob/ED3D-Galaxy-Map

derrickmehaffy commented 4 years ago

The CSS we use to define with map container is here: https://github.com/canonn-science/CanonnED3D-Map/blob/ad57146a24981df00a6cd45a93ecbaa01727d309/Source/index.html#L35-L42

kam1sh commented 4 years ago

@derrickmehaffy Hey, it works! Thank you for pointers with CSS and for fast response =)