Last updated

API / geotoolkit3d / tool / devicesupport / DeviceSupportRegistry / DeviceSupportRegistry

Class: DeviceSupportRegistry

devicesupport.DeviceSupportRegistry.DeviceSupportRegistry

This class manages 'device-support' classes.

A devicesupport class is a class that is able to listen to the specific events fired by the browser.
For example MSPointers or Touch events.

Multiple implementation can coexist and this class will provide to the client code the implementation the 'most adapted' to the current browser.

To determine which device support to use, this class prompts each devicesupport if it can works in the current environment.

device.isSupported()

The first devicesupport to answer 'true' will be picked.
If no device answers true, the default device support is used as a fallback.

Table of contents

Constructors
Methods

Contents

Constructors

new DeviceSupportRegistry()

new DeviceSupportRegistry()

Methods

getClassName

getClassName(): string

Returns

string


getAllDeviceSupport

Static getAllDeviceSupport(): AbstractDeviceSupportClass[]

Gets the array containing the constructors/class that could be instantiated and used as a device support.

Returns

AbstractDeviceSupportClass[]


getClassName

Static getClassName(): string

Returns

string


getDeviceSupport

Static getDeviceSupport(): AbstractDeviceSupportClass

Finds a devicesupport that is supported in the current browser.

Returns

AbstractDeviceSupportClass


setDefaultDeviceSupport

Static setDefaultDeviceSupport(devicesupport): void

Sets the default device support class

Parameters

Name Type Description
devicesupportAbstractDeviceSupportClassThe constructor/class to instantiate and use as the default device support

Returns

void