Socket
Socket
Sign inDemoInstall

placement.js

Package Overview
Dependencies
0
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

1.0.0-beta.5

Diff

Changelog

Source

[1.0.0-beta.5] - 2021-05-20

Added

  • New bound option to turn off bounding the overlay position to the scroll container.

Fixed

  • Fixed incorrect placement when page is scrolled horizontally.
tobscure
published 1.0.0-beta.4 •

Changelog

Source

[1.0.0-beta.4] - 2021-05-09

Changed

  • Reverted to default export.
  • Refactored code to be more reliable and concise.
tobscure
published 1.0.0-beta.3 •

Changelog

Source

[1.0.0-beta.3] - 2021-03-02

Added

  • Placement.js now accounts for nesting within positioned elements. The overlay should be positioned correctly no matter where it is.
  • If the overlay is a descendant of a scroll container, its position will be bounded automatically so it doesn't overflow the container.

Changed

  • New API:
    • The module now exports the place function instead of a default export.
    • The order of the anchor and overlay arguments is swapped.
    • The side and align parameters have been combined into a single placement option.
  • Smaller filesize. Now ~800 bytes!
  • Updated demo – use the mouse to directly manipulate the anchor and overlay elements.

Removed

  • Margins are no longer subtracted when positioning the overlay. Instead, add margins selectively depending on the [data-placement] attribute selector.
  • Removed the fixed option.
  • Removed the bound option.
  • Removed the ability to specify Coordinates or Range as the anchor.
tobscure
published 1.0.0-beta.2 •

tobscure
published 1.0.0-beta.1 •

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc