mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-20 12:00:53 +08:00
added missing .isRetina property
This commit is contained in:
@@ -10,6 +10,11 @@ myApp.controller('TestController', ($log: angular.ILogService,
|
||||
$log.info(`Result: ${result}`);
|
||||
}
|
||||
|
||||
// '.isRetina' examples
|
||||
if(screenSize.isRetina) {
|
||||
$log.info("Retina screen detected")
|
||||
}
|
||||
|
||||
// '.is(...)' examples
|
||||
var res = screenSize.is(["xs", "sm"]);
|
||||
fnCallback(res);
|
||||
|
||||
+3
@@ -8,6 +8,9 @@ declare namespace angular.matchmedia {
|
||||
|
||||
interface IScreenSize {
|
||||
|
||||
// Returns a value indicating if the current device has a retina screen
|
||||
isRetina: boolean;
|
||||
|
||||
is(list: Array<string> | string): boolean;
|
||||
|
||||
// Executes the callback function on window resize with the match truthiness as the first argument.
|
||||
|
||||
Reference in New Issue
Block a user