matkoniecz / lunar_assembler

SVG maps from OpenStreetMap data. Available at https://mapsaregreat.com/osm_to_svg_in_browser/
GNU Affero General Public License v3.0
40 stars 5 forks source link

investigate how broken touch/mobile devices are #32

Open matkoniecz opened 3 years ago

matkoniecz commented 3 years ago

For start, #1 "UX is poor - user is certainly going to draw a rectangle, step of selecting it manually is pointless" is more severe here

replaces #6

Discostu36 commented 3 years ago

I should open a pull request but don't have the time right now so I'll just dump the code here:

#generated_svg_within {
  width:800px;
  height:600px;
}

#map {
  width:600px;
  height:400px;
  position:relative
}
@media screen and (max-width: 800px) {
  #generated_svg_within {
    width:100%;
    height:calc(100vw/8*6);
  }

#map {
  width:100%;
  height:calc(100vw/6*4)
}
}
matkoniecz commented 3 years ago

thanks, I will look into it! Not immediately, as I need to understand changes - and I am not an expert.

Note that for width-height: I would really prefer to keep it in one place, so that one may easily resize this. Rather than having it in multiple independent places. Maybe even make it configurable for people using this code.

Discostu36 commented 3 years ago

It is configurable, they just need to change the CSS 😊 If you want it closer to the html you can put the css in style tags in the header instead of a css file. But you can't have responsive web-design with inline styles.