JAL-2388 Applied ViewportRanges to code