@xtctwins/tctwins-core 1.1.19 → 1.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/tctwins-core.es5.js +27517 -27493
- package/dist/tctwins-core.min.es5.js +4 -4
- package/package.json +84 -84
- package/types/extras/ContextMenu/ContextMenu.d.ts +127 -127
- package/types/extras/ContextMenu/index.d.ts +1 -1
- package/types/extras/PointerCircle/PointerCircle.d.ts +51 -51
- package/types/extras/PointerCircle/index.d.ts +1 -1
- package/types/extras/PointerLens/PointerLens.d.ts +146 -146
- package/types/extras/index.d.ts +3 -3
- package/types/index.d.ts +3 -3
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurement.d.ts +204 -204
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsControl.d.ts +91 -91
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsMouseControl.d.ts +125 -125
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsPlugin.d.ts +151 -151
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsSimulateMouseControl.d.ts +86 -86
- package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsTouchControl.d.ts +124 -124
- package/types/plugins/AngleMeasurementsPlugin/index.d.ts +5 -5
- package/types/plugins/AnnotationsPlugin/Annotation.d.ts +135 -135
- package/types/plugins/AnnotationsPlugin/AnnotationsPlugin.d.ts +172 -172
- package/types/plugins/AnnotationsPlugin/index.d.ts +2 -2
- package/types/plugins/BCFViewpointsPlugin/BCFViewpointsPlugin.d.ts +148 -148
- package/types/plugins/BCFViewpointsPlugin/index.d.ts +1 -1
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurement.d.ts +253 -253
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsControl.d.ts +96 -96
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsMouseControl.d.ts +102 -102
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.d.ts +192 -192
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsSimulateMouseControl.d.ts +83 -83
- package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsTouchControl.d.ts +103 -103
- package/types/plugins/DistanceMeasurementsPlugin/index.d.ts +5 -5
- package/types/plugins/FastNavPlugin/FastNavPlugin.d.ts +223 -223
- package/types/plugins/FastNavPlugin/index.d.ts +1 -1
- package/types/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.d.ts +142 -142
- package/types/plugins/GLTFLoaderPlugin/index.d.ts +1 -1
- package/types/plugins/LASLoaderPlugin/LASLoaderPlugin.d.ts +240 -240
- package/types/plugins/LASLoaderPlugin/index.d.ts +1 -1
- package/types/plugins/NavCubePlugin/NavCubePlugin.d.ts +177 -177
- package/types/plugins/NavCubePlugin/index.d.ts +1 -1
- package/types/plugins/ObjectEditPlugin/ObjectEditPlugin.d.ts +242 -242
- package/types/plugins/ObjectEditPlugin/index.d.ts +1 -1
- package/types/plugins/SectionPlanesPlugin/SectionBoxControl.d.ts +36 -36
- package/types/plugins/SectionPlanesPlugin/SectionPlanesPlugin.d.ts +186 -186
- package/types/plugins/SectionPlanesPlugin/index.d.ts +2 -2
- package/types/plugins/SkyboxesPlugin/SkyboxesPlugin.d.ts +66 -66
- package/types/plugins/SkyboxesPlugin/index.d.ts +1 -1
- package/types/plugins/StoreyViewsPlugin/Storey.d.ts +69 -69
- package/types/plugins/StoreyViewsPlugin/StoreyMap.d.ts +41 -41
- package/types/plugins/StoreyViewsPlugin/StoreyViewsPlugin.d.ts +180 -180
- package/types/plugins/StoreyViewsPlugin/index.d.ts +1 -1
- package/types/plugins/TreeViewPlugin/ModelTreeView.d.ts +24 -24
- package/types/plugins/TreeViewPlugin/TreeViewNode.d.ts +71 -71
- package/types/plugins/TreeViewPlugin/TreeViewPlugin.d.ts +267 -267
- package/types/plugins/TreeViewPlugin/index.d.ts +1 -1
- package/types/plugins/TreeViewPlugin/renderService.d.ts +128 -128
- package/types/plugins/ViewCullPlugin/ViewCullPlugin.d.ts +34 -34
- package/types/plugins/ViewCullPlugin/index.d.ts +1 -1
- package/types/plugins/WebIFCLoaderPlugin/WebIFCLoaderPlugin.d.ts +236 -236
- package/types/plugins/WebIFCLoaderPlugin/index.d.ts +1 -1
- package/types/plugins/XTCLoaderPlugin/XTCLoaderPlugin.d.ts +288 -288
- package/types/plugins/XTCLoaderPlugin/index.d.ts +1 -1
- package/types/plugins/index.d.ts +30 -30
- package/types/viewer/Configs.d.ts +46 -46
- package/types/viewer/Plugin.d.ts +69 -69
- package/types/viewer/Viewer.d.ts +282 -282
- package/types/viewer/index.d.ts +6 -6
- package/types/viewer/localization/LocaleService.d.ts +183 -183
- package/types/viewer/metadata/IFCObjectDefaults.d.ts +9 -9
- package/types/viewer/metadata/MetaModel.d.ts +94 -102
- package/types/viewer/metadata/MetaObject.d.ts +74 -74
- package/types/viewer/metadata/MetaScene.d.ts +135 -135
- package/types/viewer/metadata/Property.d.ts +29 -29
- package/types/viewer/metadata/PropertySet.d.ts +31 -31
- package/types/viewer/metadata/index.d.ts +6 -6
- package/types/viewer/scene/Bitmap/Bitmap.d.ts +255 -255
- package/types/viewer/scene/CameraControl/CameraControl.d.ts +777 -777
- package/types/viewer/scene/Component.d.ts +155 -155
- package/types/viewer/scene/Entity.d.ts +401 -401
- package/types/viewer/scene/LineSet/LineSet.d.ts +111 -111
- package/types/viewer/scene/camera/Camera.d.ts +364 -364
- package/types/viewer/scene/camera/CameraFlightAnimation.d.ts +167 -167
- package/types/viewer/scene/camera/CameraPath.d.ts +28 -28
- package/types/viewer/scene/camera/CameraPathAnimation.d.ts +95 -95
- package/types/viewer/scene/camera/CustomProjection.d.ts +57 -57
- package/types/viewer/scene/camera/Frustum.d.ts +166 -166
- package/types/viewer/scene/camera/Ortho.d.ts +115 -115
- package/types/viewer/scene/camera/Perspective.d.ts +136 -136
- package/types/viewer/scene/camera/index.d.ts +4 -4
- package/types/viewer/scene/geometry/Geometry.d.ts +7 -7
- package/types/viewer/scene/geometry/ReadableGeometry.d.ts +95 -95
- package/types/viewer/scene/geometry/VBOGeometry.d.ts +62 -62
- package/types/viewer/scene/geometry/builders/buildBoxGeometry.d.ts +21 -21
- package/types/viewer/scene/geometry/builders/buildBoxLinesGeometry.d.ts +21 -21
- package/types/viewer/scene/geometry/builders/buildCylinderGeometry.d.ts +27 -27
- package/types/viewer/scene/geometry/builders/buildGridGeometry.d.ts +17 -17
- package/types/viewer/scene/geometry/builders/buildPlaneGeometry.d.ts +21 -21
- package/types/viewer/scene/geometry/builders/buildSphereGeometry.d.ts +21 -21
- package/types/viewer/scene/geometry/builders/buildTorusGeometry.d.ts +25 -25
- package/types/viewer/scene/geometry/builders/buildVectorTextGeometry.d.ts +21 -21
- package/types/viewer/scene/geometry/builders/index.d.ts +8 -8
- package/types/viewer/scene/geometry/index.d.ts +2 -2
- package/types/viewer/scene/index.d.ts +23 -23
- package/types/viewer/scene/input/input.d.ts +69 -69
- package/types/viewer/scene/lights/AmbientLight.d.ts +19 -19
- package/types/viewer/scene/lights/DirLight.d.ts +25 -25
- package/types/viewer/scene/lights/Light.d.ts +3 -3
- package/types/viewer/scene/lights/PointLight.d.ts +30 -30
- package/types/viewer/scene/lights/index.d.ts +2 -2
- package/types/viewer/scene/marker/Marker.d.ts +136 -136
- package/types/viewer/scene/marker/SpriteMarker.d.ts +185 -185
- package/types/viewer/scene/marker/index.d.ts +2 -2
- package/types/viewer/scene/materials/EdgeMaterial.d.ts +83 -83
- package/types/viewer/scene/materials/EmphasisMaterial.d.ts +241 -241
- package/types/viewer/scene/materials/Fresnel.d.ts +148 -148
- package/types/viewer/scene/materials/LinesMaterial.d.ts +71 -71
- package/types/viewer/scene/materials/Material.d.ts +3 -3
- package/types/viewer/scene/materials/PhongMaterial.d.ts +468 -468
- package/types/viewer/scene/materials/PointsMaterial.d.ts +206 -206
- package/types/viewer/scene/materials/Texture.d.ts +260 -260
- package/types/viewer/scene/materials/index.d.ts +6 -6
- package/types/viewer/scene/math/Frustum.d.ts +41 -41
- package/types/viewer/scene/math/index.d.ts +1 -1
- package/types/viewer/scene/math/math.d.ts +104 -104
- package/types/viewer/scene/mementos/CameraMemento.d.ts +28 -28
- package/types/viewer/scene/mementos/ModelMemento.d.ts +44 -44
- package/types/viewer/scene/mementos/ObjectsMemento.d.ts +39 -39
- package/types/viewer/scene/mementos/index.d.ts +3 -3
- package/types/viewer/scene/mesh/Mesh.d.ts +793 -793
- package/types/viewer/scene/mesh/index.d.ts +1 -1
- package/types/viewer/scene/models/PerformanceModel/PerformanceModel.d.ts +9 -9
- package/types/viewer/scene/models/PerformanceModel/index.d.ts +1 -1
- package/types/viewer/scene/models/SceneModel.d.ts +757 -762
- package/types/viewer/scene/models/SceneModelEntity.d.ts +417 -417
- package/types/viewer/scene/models/SceneModelMesh.d.ts +68 -68
- package/types/viewer/scene/models/SceneModelTexture.d.ts +16 -16
- package/types/viewer/scene/models/SceneModelTextureSet.d.ts +51 -51
- package/types/viewer/scene/models/SceneModelTransform.d.ts +197 -197
- package/types/viewer/scene/models/VBOSceneModel/VBOSceneModel.d.ts +7 -7
- package/types/viewer/scene/models/index.d.ts +7 -7
- package/types/viewer/scene/nodes/Node.d.ts +664 -664
- package/types/viewer/scene/nodes/index.d.ts +1 -1
- package/types/viewer/scene/postfx/CrossSections.d.ts +42 -42
- package/types/viewer/scene/postfx/SAO.d.ts +209 -209
- package/types/viewer/scene/scene/Scene.d.ts +1068 -1068
- package/types/viewer/scene/sectionPlane/SectionPlane.d.ts +110 -110
- package/types/viewer/scene/sectionPlane/index.d.ts +1 -1
- package/types/viewer/scene/stats.d.ts +40 -40
- package/types/viewer/scene/viewport/Viewport.d.ts +23 -23
- package/types/viewer/scene/viewport/index.d.ts +1 -1
- package/types/viewer/scene/webgl/PickResult.d.ts +115 -115
- package/types/viewer/scene/webgl/index.d.ts +1 -1
- package/dist/tctwins-core.umd.js +0 -37
package/package.json
CHANGED
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@xtctwins/tctwins-core",
|
|
3
|
-
"version": "1.1.
|
|
4
|
-
"
|
|
5
|
-
"description": "Web Programming Toolkit for 3D/2D BIM and CAD",
|
|
6
|
-
"module": "./dist/tctwins-core.es5.js",
|
|
7
|
-
"main": "./dist/tctwins-core.min.es5.js",
|
|
8
|
-
"types": "./types/index.d.ts",
|
|
9
|
-
"scripts": {
|
|
10
|
-
"build": "rollup --config rollup.config.js && rollup --config rollup.minified.config.js",
|
|
11
|
-
"dev": "webpack --config webpack.min.config.js",
|
|
12
|
-
"latest": "npm view @xtctwins/tctwins-core version --registry=https://registry.npmjs.org/",
|
|
13
|
-
"serve": "vite --open --mode dev",
|
|
14
|
-
"prepublishOnly": "npm run build",
|
|
15
|
-
"pub": "npm publish",
|
|
16
|
-
"release": "npm version patch && npm publish --access public"
|
|
17
|
-
},
|
|
18
|
-
"keywords": [
|
|
19
|
-
"webgl",
|
|
20
|
-
"webgl2",
|
|
21
|
-
"javascript",
|
|
22
|
-
"tctwins",
|
|
23
|
-
"ifc",
|
|
24
|
-
"bcf",
|
|
25
|
-
"bim",
|
|
26
|
-
"revit",
|
|
27
|
-
"fbx",
|
|
28
|
-
"catia",
|
|
29
|
-
"gis",
|
|
30
|
-
"cad",
|
|
31
|
-
"buildingsmart",
|
|
32
|
-
"solidworks",
|
|
33
|
-
"gltf",
|
|
34
|
-
"3dxml",
|
|
35
|
-
"obj",
|
|
36
|
-
"stl",
|
|
37
|
-
"laz",
|
|
38
|
-
"las",
|
|
39
|
-
"pointcloud",
|
|
40
|
-
"3d-viewer"
|
|
41
|
-
],
|
|
42
|
-
"author": "Shao Xiang",
|
|
43
|
-
"license": "MIT",
|
|
44
|
-
"homepage": "https://tctwins.com",
|
|
45
|
-
"devDependencies": {
|
|
46
|
-
"@babel/cli": "^7.24.7",
|
|
47
|
-
"@babel/core": "^7.25.2",
|
|
48
|
-
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
49
|
-
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
|
|
50
|
-
"@babel/plugin-transform-class-static-block": "^7.24.7",
|
|
51
|
-
"@babel/preset-env": "^7.25.2",
|
|
52
|
-
"@loaders.gl/core": "^3.2.6",
|
|
53
|
-
"@loaders.gl/gltf": "^3.2.6",
|
|
54
|
-
"@loaders.gl/las": "^3.2.6",
|
|
55
|
-
"@rollup/plugin-babel": "^5.3.1",
|
|
56
|
-
"@rollup/plugin-commonjs": "^28.0.5",
|
|
57
|
-
"@rollup/plugin-json": "^6.1.0",
|
|
58
|
-
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
59
|
-
"babel-loader": "^9.1.3",
|
|
60
|
-
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
61
|
-
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
|
|
62
|
-
"esdoc": "^1.1.0",
|
|
63
|
-
"esdoc-custom-theme": "^1.4.2",
|
|
64
|
-
"esdoc-publish-html-plugin": "^1.1.2",
|
|
65
|
-
"esdoc-standard-plugin": "^1.0.0",
|
|
66
|
-
"eslint": "^8.13.0",
|
|
67
|
-
"html2canvas": "^1.4.1",
|
|
68
|
-
"parse5": "^7.0.0",
|
|
69
|
-
"rollup": "^2.70.2",
|
|
70
|
-
"rollup-plugin-livereload": "^2.0.5",
|
|
71
|
-
"rollup-plugin-terser": "^7.0.2",
|
|
72
|
-
"typedoc": "^0.22.15",
|
|
73
|
-
"vite": "^6.3.5",
|
|
74
|
-
"webpack-cli": "^5.1.4"
|
|
75
|
-
},
|
|
76
|
-
"files": [
|
|
77
|
-
"/dist",
|
|
78
|
-
"/types"
|
|
79
|
-
],
|
|
80
|
-
"publishConfig": {
|
|
81
|
-
"registry": "https://registry.npmjs.org/",
|
|
82
|
-
"access": "public"
|
|
83
|
-
}
|
|
84
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@xtctwins/tctwins-core",
|
|
3
|
+
"version": "1.1.20",
|
|
4
|
+
"packageManager": "yarn@4.18.1",
|
|
5
|
+
"description": "Web Programming Toolkit for 3D/2D BIM and CAD",
|
|
6
|
+
"module": "./dist/tctwins-core.es5.js",
|
|
7
|
+
"main": "./dist/tctwins-core.min.es5.js",
|
|
8
|
+
"types": "./types/index.d.ts",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"build": "rollup --config rollup.config.js && rollup --config rollup.minified.config.js",
|
|
11
|
+
"dev": "webpack --config webpack.min.config.js",
|
|
12
|
+
"latest": "npm view @xtctwins/tctwins-core version --registry=https://registry.npmjs.org/",
|
|
13
|
+
"serve": "vite --open --mode dev",
|
|
14
|
+
"prepublishOnly": "npm run build",
|
|
15
|
+
"pub": "npm publish",
|
|
16
|
+
"release": "npm version patch && npm publish --access public"
|
|
17
|
+
},
|
|
18
|
+
"keywords": [
|
|
19
|
+
"webgl",
|
|
20
|
+
"webgl2",
|
|
21
|
+
"javascript",
|
|
22
|
+
"tctwins",
|
|
23
|
+
"ifc",
|
|
24
|
+
"bcf",
|
|
25
|
+
"bim",
|
|
26
|
+
"revit",
|
|
27
|
+
"fbx",
|
|
28
|
+
"catia",
|
|
29
|
+
"gis",
|
|
30
|
+
"cad",
|
|
31
|
+
"buildingsmart",
|
|
32
|
+
"solidworks",
|
|
33
|
+
"gltf",
|
|
34
|
+
"3dxml",
|
|
35
|
+
"obj",
|
|
36
|
+
"stl",
|
|
37
|
+
"laz",
|
|
38
|
+
"las",
|
|
39
|
+
"pointcloud",
|
|
40
|
+
"3d-viewer"
|
|
41
|
+
],
|
|
42
|
+
"author": "Shao Xiang",
|
|
43
|
+
"license": "MIT",
|
|
44
|
+
"homepage": "https://tctwins.com",
|
|
45
|
+
"devDependencies": {
|
|
46
|
+
"@babel/cli": "^7.24.7",
|
|
47
|
+
"@babel/core": "^7.25.2",
|
|
48
|
+
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
49
|
+
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
|
|
50
|
+
"@babel/plugin-transform-class-static-block": "^7.24.7",
|
|
51
|
+
"@babel/preset-env": "^7.25.2",
|
|
52
|
+
"@loaders.gl/core": "^3.2.6",
|
|
53
|
+
"@loaders.gl/gltf": "^3.2.6",
|
|
54
|
+
"@loaders.gl/las": "^3.2.6",
|
|
55
|
+
"@rollup/plugin-babel": "^5.3.1",
|
|
56
|
+
"@rollup/plugin-commonjs": "^28.0.5",
|
|
57
|
+
"@rollup/plugin-json": "^6.1.0",
|
|
58
|
+
"@rollup/plugin-node-resolve": "^13.3.0",
|
|
59
|
+
"babel-loader": "^9.1.3",
|
|
60
|
+
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
61
|
+
"babel-plugin-transform-es2015-modules-commonjs": "^6.26.2",
|
|
62
|
+
"esdoc": "^1.1.0",
|
|
63
|
+
"esdoc-custom-theme": "^1.4.2",
|
|
64
|
+
"esdoc-publish-html-plugin": "^1.1.2",
|
|
65
|
+
"esdoc-standard-plugin": "^1.0.0",
|
|
66
|
+
"eslint": "^8.13.0",
|
|
67
|
+
"html2canvas": "^1.4.1",
|
|
68
|
+
"parse5": "^7.0.0",
|
|
69
|
+
"rollup": "^2.70.2",
|
|
70
|
+
"rollup-plugin-livereload": "^2.0.5",
|
|
71
|
+
"rollup-plugin-terser": "^7.0.2",
|
|
72
|
+
"typedoc": "^0.22.15",
|
|
73
|
+
"vite": "^6.3.5",
|
|
74
|
+
"webpack-cli": "^5.1.4"
|
|
75
|
+
},
|
|
76
|
+
"files": [
|
|
77
|
+
"/dist",
|
|
78
|
+
"/types"
|
|
79
|
+
],
|
|
80
|
+
"publishConfig": {
|
|
81
|
+
"registry": "https://registry.npmjs.org/",
|
|
82
|
+
"access": "public"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -1,127 +1,127 @@
|
|
|
1
|
-
export declare type ContextMenuConfiguration = {
|
|
2
|
-
/** The context menu items. These can also be dynamically set on {@link ContextMenu.items}. See the class documentation for an example. */
|
|
3
|
-
items?: any;
|
|
4
|
-
/** The context, which is passed into the item callbacks. This can also be dynamically set on {@link ContextMenu.context}. This must be set before calling {@link ContextMenu.show}. */
|
|
5
|
-
context?: any;
|
|
6
|
-
/** Whether this ````ContextMenu```` is initially enabled. {@link ContextMenu.show} does nothing while this is ````false````. */
|
|
7
|
-
enabled?: boolean;
|
|
8
|
-
/** Whether this ````ContextMenu```` automatically hides whenever we mouse-down or tap anywhere in the page. */
|
|
9
|
-
hideOnMouseDown?: boolean;
|
|
10
|
-
/** Whether this ````ContextMenu```` automatically hides after we select a menu item. Se false if we want the menu to remain shown and show any updates to its item titles, after we've selected an item. */
|
|
11
|
-
hideOnAction?: boolean;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* A customizable HTML context menu.
|
|
16
|
-
*/
|
|
17
|
-
export declare class ContextMenu {
|
|
18
|
-
/**
|
|
19
|
-
* @constructor
|
|
20
|
-
*
|
|
21
|
-
* @param {ContextMenuConfiguration} [cfg] ````ContextMenu```` configuration.
|
|
22
|
-
*/
|
|
23
|
-
constructor(cfg?: ContextMenuConfiguration);
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* Sets the ````ContextMenu```` items.
|
|
27
|
-
*
|
|
28
|
-
* These can be updated dynamically at any time.
|
|
29
|
-
*
|
|
30
|
-
* See class documentation for an example.
|
|
31
|
-
*
|
|
32
|
-
* @type {Object[]}
|
|
33
|
-
*/
|
|
34
|
-
set items(arg: any[]);
|
|
35
|
-
|
|
36
|
-
/**
|
|
37
|
-
* Gets the ````ContextMenu```` items.
|
|
38
|
-
*
|
|
39
|
-
* @type {Object[]}
|
|
40
|
-
*/
|
|
41
|
-
get items(): any[];
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Sets the ````ContextMenu```` context.
|
|
45
|
-
*
|
|
46
|
-
* The context can be any object that you need to be provides to the callbacks configured on {@link ContextMenu.items}.
|
|
47
|
-
*
|
|
48
|
-
* This must be set before calling {@link ContextMenu.show}.
|
|
49
|
-
*
|
|
50
|
-
* @type {Object}
|
|
51
|
-
*/
|
|
52
|
-
set context(arg: any);
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Gets the ````ContextMenu```` context.
|
|
56
|
-
*
|
|
57
|
-
* @type {Object}
|
|
58
|
-
*/
|
|
59
|
-
get context(): any;
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Sets whether this ````ContextMenu```` is enabled.
|
|
63
|
-
*
|
|
64
|
-
* Hides the menu when disabling.
|
|
65
|
-
*
|
|
66
|
-
* @type {Boolean}
|
|
67
|
-
*/
|
|
68
|
-
set enabled(arg: boolean);
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Gets whether this ````ContextMenu```` is enabled.
|
|
72
|
-
*
|
|
73
|
-
* {@link ContextMenu.show} does nothing while this is ````false````.
|
|
74
|
-
*
|
|
75
|
-
* @type {Boolean}
|
|
76
|
-
*/
|
|
77
|
-
get enabled(): boolean;
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
Subscribes to an event fired at this ````ContextMenu````.
|
|
81
|
-
|
|
82
|
-
@param {String} event The event
|
|
83
|
-
@param {Function} callback Callback fired on the event
|
|
84
|
-
*/
|
|
85
|
-
on(event: string, callback: Function): void;
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
Fires an event at this ````ContextMenu````.
|
|
89
|
-
|
|
90
|
-
@param {String} event The event type name
|
|
91
|
-
@param {Object} value The event parameters
|
|
92
|
-
*/
|
|
93
|
-
fire(event: string, value: any): void;
|
|
94
|
-
|
|
95
|
-
/**
|
|
96
|
-
* Shows this ````ContextMenu```` at the given page coordinates.
|
|
97
|
-
*
|
|
98
|
-
* Does nothing when {@link ContextMenu.enabled} is ````false````.
|
|
99
|
-
*
|
|
100
|
-
* Logs error to console and does nothing if {@link ContextMenu.context} has not been set.
|
|
101
|
-
*
|
|
102
|
-
* Fires a "shown" event when shown.
|
|
103
|
-
*
|
|
104
|
-
* @param {Number} pageX Page X-coordinate.
|
|
105
|
-
* @param {Number} pageY Page Y-coordinate.
|
|
106
|
-
*/
|
|
107
|
-
show(pageX: number, pageY: number): void;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* Gets whether this ````ContextMenu```` is currently shown or not.
|
|
111
|
-
*
|
|
112
|
-
* @returns {Boolean} Whether this ````ContextMenu```` is shown.
|
|
113
|
-
*/
|
|
114
|
-
get shown(): boolean;
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* Hides this ````ContextMenu````.
|
|
118
|
-
*
|
|
119
|
-
* Fires a "hidden" event when hidden.
|
|
120
|
-
*/
|
|
121
|
-
hide(): void;
|
|
122
|
-
|
|
123
|
-
/**
|
|
124
|
-
* Destroys this ````ContextMenu````.
|
|
125
|
-
*/
|
|
126
|
-
destroy(): void;
|
|
127
|
-
}
|
|
1
|
+
export declare type ContextMenuConfiguration = {
|
|
2
|
+
/** The context menu items. These can also be dynamically set on {@link ContextMenu.items}. See the class documentation for an example. */
|
|
3
|
+
items?: any;
|
|
4
|
+
/** The context, which is passed into the item callbacks. This can also be dynamically set on {@link ContextMenu.context}. This must be set before calling {@link ContextMenu.show}. */
|
|
5
|
+
context?: any;
|
|
6
|
+
/** Whether this ````ContextMenu```` is initially enabled. {@link ContextMenu.show} does nothing while this is ````false````. */
|
|
7
|
+
enabled?: boolean;
|
|
8
|
+
/** Whether this ````ContextMenu```` automatically hides whenever we mouse-down or tap anywhere in the page. */
|
|
9
|
+
hideOnMouseDown?: boolean;
|
|
10
|
+
/** Whether this ````ContextMenu```` automatically hides after we select a menu item. Se false if we want the menu to remain shown and show any updates to its item titles, after we've selected an item. */
|
|
11
|
+
hideOnAction?: boolean;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* A customizable HTML context menu.
|
|
16
|
+
*/
|
|
17
|
+
export declare class ContextMenu {
|
|
18
|
+
/**
|
|
19
|
+
* @constructor
|
|
20
|
+
*
|
|
21
|
+
* @param {ContextMenuConfiguration} [cfg] ````ContextMenu```` configuration.
|
|
22
|
+
*/
|
|
23
|
+
constructor(cfg?: ContextMenuConfiguration);
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Sets the ````ContextMenu```` items.
|
|
27
|
+
*
|
|
28
|
+
* These can be updated dynamically at any time.
|
|
29
|
+
*
|
|
30
|
+
* See class documentation for an example.
|
|
31
|
+
*
|
|
32
|
+
* @type {Object[]}
|
|
33
|
+
*/
|
|
34
|
+
set items(arg: any[]);
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Gets the ````ContextMenu```` items.
|
|
38
|
+
*
|
|
39
|
+
* @type {Object[]}
|
|
40
|
+
*/
|
|
41
|
+
get items(): any[];
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Sets the ````ContextMenu```` context.
|
|
45
|
+
*
|
|
46
|
+
* The context can be any object that you need to be provides to the callbacks configured on {@link ContextMenu.items}.
|
|
47
|
+
*
|
|
48
|
+
* This must be set before calling {@link ContextMenu.show}.
|
|
49
|
+
*
|
|
50
|
+
* @type {Object}
|
|
51
|
+
*/
|
|
52
|
+
set context(arg: any);
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Gets the ````ContextMenu```` context.
|
|
56
|
+
*
|
|
57
|
+
* @type {Object}
|
|
58
|
+
*/
|
|
59
|
+
get context(): any;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Sets whether this ````ContextMenu```` is enabled.
|
|
63
|
+
*
|
|
64
|
+
* Hides the menu when disabling.
|
|
65
|
+
*
|
|
66
|
+
* @type {Boolean}
|
|
67
|
+
*/
|
|
68
|
+
set enabled(arg: boolean);
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Gets whether this ````ContextMenu```` is enabled.
|
|
72
|
+
*
|
|
73
|
+
* {@link ContextMenu.show} does nothing while this is ````false````.
|
|
74
|
+
*
|
|
75
|
+
* @type {Boolean}
|
|
76
|
+
*/
|
|
77
|
+
get enabled(): boolean;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
Subscribes to an event fired at this ````ContextMenu````.
|
|
81
|
+
|
|
82
|
+
@param {String} event The event
|
|
83
|
+
@param {Function} callback Callback fired on the event
|
|
84
|
+
*/
|
|
85
|
+
on(event: string, callback: Function): void;
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
Fires an event at this ````ContextMenu````.
|
|
89
|
+
|
|
90
|
+
@param {String} event The event type name
|
|
91
|
+
@param {Object} value The event parameters
|
|
92
|
+
*/
|
|
93
|
+
fire(event: string, value: any): void;
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Shows this ````ContextMenu```` at the given page coordinates.
|
|
97
|
+
*
|
|
98
|
+
* Does nothing when {@link ContextMenu.enabled} is ````false````.
|
|
99
|
+
*
|
|
100
|
+
* Logs error to console and does nothing if {@link ContextMenu.context} has not been set.
|
|
101
|
+
*
|
|
102
|
+
* Fires a "shown" event when shown.
|
|
103
|
+
*
|
|
104
|
+
* @param {Number} pageX Page X-coordinate.
|
|
105
|
+
* @param {Number} pageY Page Y-coordinate.
|
|
106
|
+
*/
|
|
107
|
+
show(pageX: number, pageY: number): void;
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* Gets whether this ````ContextMenu```` is currently shown or not.
|
|
111
|
+
*
|
|
112
|
+
* @returns {Boolean} Whether this ````ContextMenu```` is shown.
|
|
113
|
+
*/
|
|
114
|
+
get shown(): boolean;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Hides this ````ContextMenu````.
|
|
118
|
+
*
|
|
119
|
+
* Fires a "hidden" event when hidden.
|
|
120
|
+
*/
|
|
121
|
+
hide(): void;
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Destroys this ````ContextMenu````.
|
|
125
|
+
*/
|
|
126
|
+
destroy(): void;
|
|
127
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./ContextMenu";
|
|
1
|
+
export * from "./ContextMenu";
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import { Viewer } from "../../viewer";
|
|
2
|
-
export class PointerCircle {
|
|
3
|
-
/**
|
|
4
|
-
* Constructs a new PointerCircle.
|
|
5
|
-
*
|
|
6
|
-
* @param {Viewer} viewer The Viewer instance.
|
|
7
|
-
* @param {Object} [cfg] PointerCircle configuration.
|
|
8
|
-
* @param {boolean} [cfg.active=true] Whether PointerCircle is active. The PointerCircle can only be shown when this is `true` (default).
|
|
9
|
-
* @param {number} [cfg.zoomFactor=2] The zoom factor for the lens.
|
|
10
|
-
*/
|
|
11
|
-
constructor(
|
|
12
|
-
viewer: Viewer,
|
|
13
|
-
cfg?: {
|
|
14
|
-
active?: boolean;
|
|
15
|
-
zoomFactor?: number;
|
|
16
|
-
}
|
|
17
|
-
);
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* Show the circle at the given canvas coordinates and begin shrinking it.
|
|
21
|
-
*/
|
|
22
|
-
start(circlePos: any): void;
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Stop the shricking circle and hide it.
|
|
26
|
-
*/
|
|
27
|
-
stop(): void;
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Sets the zoom factor for the lens.
|
|
31
|
-
*
|
|
32
|
-
* This is `2` by default.
|
|
33
|
-
*
|
|
34
|
-
* @param durationMs
|
|
35
|
-
*/
|
|
36
|
-
set durationMs(durationMs: number);
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Gets the zoom factor for the lens.
|
|
40
|
-
*
|
|
41
|
-
* This is `2` by default.
|
|
42
|
-
*
|
|
43
|
-
* @returns Number
|
|
44
|
-
*/
|
|
45
|
-
get durationMs(): number;
|
|
46
|
-
|
|
47
|
-
/**
|
|
48
|
-
* Destroys this PointerLens.
|
|
49
|
-
*/
|
|
50
|
-
destroy(): void;
|
|
51
|
-
}
|
|
1
|
+
import { Viewer } from "../../viewer";
|
|
2
|
+
export class PointerCircle {
|
|
3
|
+
/**
|
|
4
|
+
* Constructs a new PointerCircle.
|
|
5
|
+
*
|
|
6
|
+
* @param {Viewer} viewer The Viewer instance.
|
|
7
|
+
* @param {Object} [cfg] PointerCircle configuration.
|
|
8
|
+
* @param {boolean} [cfg.active=true] Whether PointerCircle is active. The PointerCircle can only be shown when this is `true` (default).
|
|
9
|
+
* @param {number} [cfg.zoomFactor=2] The zoom factor for the lens.
|
|
10
|
+
*/
|
|
11
|
+
constructor(
|
|
12
|
+
viewer: Viewer,
|
|
13
|
+
cfg?: {
|
|
14
|
+
active?: boolean;
|
|
15
|
+
zoomFactor?: number;
|
|
16
|
+
}
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Show the circle at the given canvas coordinates and begin shrinking it.
|
|
21
|
+
*/
|
|
22
|
+
start(circlePos: any): void;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Stop the shricking circle and hide it.
|
|
26
|
+
*/
|
|
27
|
+
stop(): void;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Sets the zoom factor for the lens.
|
|
31
|
+
*
|
|
32
|
+
* This is `2` by default.
|
|
33
|
+
*
|
|
34
|
+
* @param durationMs
|
|
35
|
+
*/
|
|
36
|
+
set durationMs(durationMs: number);
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Gets the zoom factor for the lens.
|
|
40
|
+
*
|
|
41
|
+
* This is `2` by default.
|
|
42
|
+
*
|
|
43
|
+
* @returns Number
|
|
44
|
+
*/
|
|
45
|
+
get durationMs(): number;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Destroys this PointerLens.
|
|
49
|
+
*/
|
|
50
|
+
destroy(): void;
|
|
51
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from "./PointerCircle";
|
|
1
|
+
export * from "./PointerCircle";
|