mapillary-js icon indicating copy to clipboard operation
mapillary-js copied to clipboard

Handle non-zero border on viewer container

Open oscarlorentzon opened this issue 7 years ago • 1 comments

When a non-zero border is used the library does not behave properly because the canvas is shifted and it is not entirely shown because of the fact that offset* values are used. This leads to the following when having top and left borders.

  • Only top left of part photo is shown leading to faulty bouncing among other things.
  • All DOM rendered items that use percentages like TagComponent render in the wrong place.

Relevant reference: https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model/Determining_the_dimensions_of_elements

Currently the library does not support non-zero border. Maybe a note about this in the docs is enough for now.

oscarlorentzon avatar Mar 21 '17 10:03 oscarlorentzon

I think a note and maybe an assert is enough.

gyllen avatar Mar 21 '17 23:03 gyllen