JSPM

intersect-client-rects

1.0.1
    • ESM via JSPM
    • ES Module Entrypoint
    • Export Map
    • Keywords
    • License
    • Repository URL
    • TypeScript Types
    • README
    • Created
    • Published
    • Downloads 19
    • Score
      100M100P100Q51489F
    • License MIT

    Find the intersection area of multiple client rects

    Package Exports

    • intersect-client-rects

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (intersect-client-rects) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    intersect-client-rects Build Status

    Find the intersection area of multiple client rects

    Install

    $ npm install intersect-client-rects

    API

    intersectClientRects(rect1, rect2 ... rectN)

    var intersectClientRects = require('intersect-client-rects')
    
    intersectClientRects(
          {
            left: 0,
            top: 0,
            right: 200,
            bottom: 200
          },
          {
            left: 100,
            top: 100,
            right: 300,
            bottom: 300
          }
       )
    // => { left: 100, top: 100, right: 200, bottom: 200, width: 100, height: 100}

    License

    MIT