Skip to content
MapSVG 8/Documentation

env

const env: object;
getBrowser: () => object;

Gets browser info (IE, Firefox, Safari).

object

firefox: boolean;
ie: boolean;
safari: boolean;
getDevice: () => object;

Detects if the device is iOS or Android.

object

android: boolean;
ios: boolean;
getMouseCoords: (e) => object;

Gets mouse or touch coordinates from an event.

ParameterTypeDescription
eMouseEvent | TouchEvent | TriggeredEvent<any, any, any, any>

object

x: number;
y: number;
getUserAgent: () => string;

Gets the user agent string in lowercase.

string

isMac: () => boolean;

Checks if the current OS is Mac.

boolean

isPhone: () => boolean;

Checks if the device is a phone (max-width: 767px).

boolean