How to move the figures? x and y works only in circle (or maybe others), but I need to either in polygon or in path. There x and y do not work. Just move on the page, my figures are always in the upper corner. HTML:

<div id="mapa" class="dragger"> </div> <svg id="_mapa" class="dragger" xmlns="http://www.w3.org/2000/svg"> <path stroke="lightseagreen" stroke-width="5" fill="turquoise" d="M 20,20 h 160 v 160 h -80 v -80 h -80 z"/> </svg> 

CSS:

 #mapa { position: relative; width: 6000px; height: 6000px; overflow: hidden; background: url('../img/map.jpg') no-repeat; background-size: 6000px 6000px; } #_mapa { position: absolute; top: 0; left: 0; width: 6000px; height: 6000px; overflow: hidden; background-size: 6000px 6000px; pointer-events: visibleFill; 

}

  • The code at least would show - user33274
  • Added code .... - francoder 4:39 pm

1 answer 1

 top: 0; left: 0; 

maybe that's why they are always left in the corner ..?

  • Then the figures go beyond the picture, and I need to draw them exactly on this picture. - francoder
  • @MaxFranko ?? jsfiddle.net/zy6oybrL - C.Raf.T 5:41 pm
  • @MaxFranko happens ..)))) - C.Raf.T
  • Not that, it changes the position of the svg itself (hence this figure too), but I will have many figures and each has its own position in the picture. - francoder pm
  • so set each position of your fgure when creating it ... just don’t need to give them dimensions 6000px - C.Raf.T