Add indexing based on clicked pixel coordinates.