anchor.diff:  //Same as above function but with some values changed to suit minimap
   function TKMViewport.GetMinimapClip: TKMRect;
   begin
  -  Result.Left   := Math.max(round(fPosition.X-(fViewportClip.X/2-fViewRect.Left+fToolBarWidth)/CELL_SIZE_PX/fZoom)+1, 1);
  -  Result.Right  := Math.min(round(fPosition.X+(fViewportClip.X/2+fViewRect.Left-fToolBarWidth)/CELL_SIZE_PX/fZoom)+1, fMapX);
  -  Result.Top    := Math.max(round(fPosition.Y-fViewportClip.Y/2/CELL_SIZE_PX/fZoom)+2, 1);
  -  Result.Bottom := Math.min(round(fPosition.Y+fViewportClip.Y/2/CELL_SIZE_PX/fZoom), fMapY);
  +  Result.Left   := Max(Round(fPosition.X - (fViewportClip.X/2 - fViewRect.Left + ToolbarWidth)/ZoomedCellSizePX) + 1, 1);
  +  Result.Right  := Min(Round(fPosition.X + (fViewportClip.X/2 + fViewRect.Left - ToolbarWidth)/ZoomedCellSizePX) + 1, fMapX);
  +  Result.Top    := Max(Round(fPosition.Y - fViewportClip.Y/2/ZoomedCellSizePX) + 2, 1);
  +  Result.Bottom := Min(Round(fPosition.Y + fViewportClip.Y/2/ZoomedCellSizePX), fMapY);
   end;
   
   
   procedure TKMViewport.ReleaseScrollKeys;
   begin
  -  ScrollKeyLeft  := false;
  -  ScrollKeyRight := false;
  -  ScrollKeyUp    := false;
  -  ScrollKeyDown  := false;
  -  ZoomKeyIn      := false;
  -  ZoomKeyOut     := false;
  +  ScrollKeyLeft  := False;
  +  ScrollKeyRight := False;
  +  ScrollKeyUp    := False;
  +  ScrollKeyDown  := False;
  +  ZoomKeyIn      := False;
  +  ZoomKeyOut     := False;
   end;
   
   
  
positive.code: 
  procedure TKMViewport.Resize(NewWidth, NewHeight: Integer);
  begin
    fViewRect.Left   := fToolBarWidth;
    fViewRect.Top    := 0;
    fViewRect.Right  := NewWidth;
    fViewRect.Bottom := NewHeight;
  
    fViewportClip.X := fViewRect.Right-fViewRect.Left;
    fViewportClip.Y := fViewRect.Bottom-fViewRect.Top;
  
    SetZoom(fZoom); //View size has changed and that affects Zoom restrictions
  end;
  
negative.code:     fPanTo, fPanFrom: TKMPointF;
      fPanImmidiately : Boolean;
      fPanDuration, fPanProgress: Cardinal;
      fToolbarWidth: Integer;
      function GetPosition: TKMPointF;
      procedure SetPosition(const Value: TKMPointF);
      procedure SetZoom(aZoom: Single);
      function GetToolbarWidth: Integer;
      function GetTopPad: Single;
      function GetZoomedCellSizePx: Single; inline;
  
      property ToolbarWidth: Integer read GetToolbarWidth;
      property ZoomedCellSizePX: Single read GetZoomedCellSizePx; // Cell size in pixels in current zoom
    public
      ScrollKeyLeft, ScrollKeyRight, ScrollKeyUp, ScrollKeyDown, ZoomKeyIn, ZoomKeyOut: boolean;
      constructor Create(aToolBarWidth: Integer; aWidth, aHeight: Integer);
  