Create a viewer that displays a .dwg asset file and a number of useful tools for viewing DWG files.
Signature:
export default class DWGViewer(locale: string, containerId: string, assetId: string, onReady: (viewer: DWGViewer)=>void , onError: (err: string)=>void);
Parameter | Type | Description |
---|---|---|
locale | string | The language of the UI, either "zh" or "en". |
containerId | string | The id of a DIV DOM which will host the viewer. |
assetId | string | The asset id of the DWG file which is obtained either in asset management website or returned in upload function. |
onReady | (viewer: DWGViewer)=>void | Callback when the viewer is created. |
onError | (err: string)=>void | Callback when some errors happen. |
Returns:
Modelo.UI.DWGViewer
Method | Modifiers | Description |
---|---|---|
destroy() | --- | Destroy the viewer. |