@Override public void zoomChanged(int squareSize) { Position prevSelectedPosition = selectedPosition; super.zoomChanged(squareSize); if (selectedPosition != null && selectedPosition.equals(prevSelectedPosition)) { // no square enter/leave trigger in this case - refresh areas areas = prepareAreas(gridPanel.getTile(selectedPosition), selectedPosition); } }
public boolean at(Position p) { if (position == null) return false; return position.equals(p); }