Skip to content

TomByrne/cordova-screenppi-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#Cordova Screen PPI Plugin

Cordova plugin to access the screen PPI.

Currently only supports Android & iOS.

Heavily based on Yoik's Screen Orientation API plugin.

The plugin adds the following to the screen object:

screenPPI The average PPI for the screen

##Install

cordova plugin add org.tbyrne.cordova.plugins.screenppi

###Source https://github.com/yoik/cordova-yoik-screenorientation

##Usage

console.log( "Screen is "+(window.outerWidth / screen.screenPPI)+" inches wide" );

Pull requests welcome.

About

A simple plugin for Cordova / PhoneGap to access the device's screen PPI

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published