---
# System prepended metadata

title: Untitled

---


```js
function calculateSelectorsToFindRegionsFor({sizeMode, selector, ignore, floating, ...}) : {
    selectorsToFindRegionsFor: Array<{type, selector}>,
    getMatchRegions(selectorRegions: Array<Array<Region>>) : {ignore, floating, ...}
  }
  // getMatchRegion creates the input to createCheckSettings, so inside it will include:
   const accessibilityRegion =
  regions[4] &&
  regions[4].map((region, index) => {
      return Object.assign(region, {
      accessibilityType: codedRegions[4][index].accessibilityType,
      })
  })
  const floatingRegion =
  regions[5] &&
  regions[5].map((region, index) => {
      const floatingRegion = codedRegions[5][index]
      return Object.assign(region, {
      maxUpOffset: floatingRegion.maxUpOffset,
      maxDownOffset: floatingRegion.maxDownOffset,
      maxLeftOffset: floatingRegion.maxLeftOffset,
      maxRightOffset: floatingRegion.maxRightOffset,
      })
  })
  createRenderRequests({userRegions}) ==> createRenderRequests({selectorsToFindRegions})
  checkWindow.js
  const {selectorsToFindRegionsFor, getMatchRegions} = calculateSelectorsToFindRegionsFor({sizeMode, selector, ignore, floating, ...})
  
  const {
          imageLocation: screenshotUrl,
          domLocation,
          userAgent,
          deviceSize,
          selectorRegions,
        } = renderStatusResult
  const {ignore, ...} = getMatchRegions(selectorRegions)
  ```

```
1 single selector (without array) => 1 grid region | {selector: 'bla'}
1 selector => 1 grid region | [{selector: 'bla'}]
2 selectors => 1 grid region for each selector | [{selector: 'bla1'}, {selector: 'bla2'}] ==> [[{top, left, ...}], [{top, left, ...}]] ==> output
2 selectors => 5 grid regions (2, 3) | [{selector: 'bla1'}, {selector: 'bla2'}] ==> [[{}, {}], [{}, {}, {}]]
3 ignore regions (2 selectors and 1 region) => [{selector: 'bla1'}, {top/y, left/x} (r-user), {selector: 'bla2'}] ==> [[r1-1, r1-2], [r2-1, r2-2, r2-3]] ==> output: [r1-1, r1-2, r-user, r2-1, r2-2, r2-3]
```
