title: openlayers 5: move map center by a pixels value
body: <p>I have an openlayers 5 map generated by:</p>
  
  <pre><code>// create the map with the proper center
  var map = new ol.Map(
      {
          view: new ol.View(
              {
                  center: ol.proj.fromLonLat([center.long, center.lat]),
                  zoom: zoom
              }
          ),
          layers: [
              new ol.layer.Tile(
                  {
                      source: new ol.source.OSM()
                  }
              )
          ],
          target: 'mapdiv',
      }
  );
  </code></pre>
  
  <p>I want move the center of the map by [10, 10] pixels clicking on an element, and I'm trying with an event like:</p>
  
  <pre><code>document.getElementById('mover').onclick = function() {
    center = map.getView().getCenter();
    map.view.setCenter(center[0] + 10, center[1] + 10);
    return false;
  };
  </code></pre>
  
  <p>but it doesn't work, it breaks the map.</p>
  
  <p>What is the correct way to achieve the move?</p>