Skip to content

API / geotoolkit3d / tool / devicesupport / DeviceSupportRegistry / DeviceSupportRegistry

Class: DeviceSupportRegistry

devicesupport.DeviceSupportRegistry.DeviceSupportRegistry

This class manages 'device-support' classes.<br> <br> A devicesupport class is a class that is able to listen to the specific events fired by the browser.<br> For example MSPointers or Touch events.<br> <br> Multiple implementation can coexist and this class will provide to the client code the implementation the 'most adapted' to the current browser.<br> <br> To determine which device support to use, this class prompts each devicesupport if it can works in the current environment.<br> > device.isSupported()<br> <br> The first devicesupport to answer 'true' will be picked.<br> If no device answers true, the default device support is used as a fallback.<br> <br>

Table of contents

Constructors
  • [new DeviceSupportRegistry()](/solutions/geotoolkit/GeoToolkit_JS/apis/classes/geotoolkit3d.tool.devicesupport.devicesupportregistry.devicesupportregistry.md#new devicesupportregistry())
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