New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

nylira-maximize

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

nylira-maximize

Maximize the specified DOM element to fill the user's screen while retaining aspect ratio.

  • 0.1.6
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

nylira-maximize

nylira-maximize is a simple function that maximizes the specified DOM element to your preferred aspect ratio.

Use it

Install with NPM:

$ npm install nylira-maximize

Example usage:

var maximize = require('nylira-maximize')
var gameCanvas = document.getElementById('gameCanvas')

maximize(gameCanvas, 1920, 1080)

This example will resize the #gameCanvas element to fill the screen horizontally. It will also keep the 16:9 aspect ratio.

The 1920, 1080 parameters are WIDTH and HEIGHT respectively. The function uses WIDTH and HEIGHT to get your aspect ratio.

License

MIT

Keywords

FAQs

Package last updated on 15 Mar 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc