@inweb/viewer-visualize 25.3.13 → 25.3.17
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 +20 -20
- package/dist/viewer-visualize.js +313 -1
- package/dist/viewer-visualize.js.map +1 -1
- package/dist/viewer-visualize.min.js +1 -1
- package/dist/viewer-visualize.module.js +330 -2
- package/dist/viewer-visualize.module.js.map +1 -1
- package/lib/index.d.ts +2 -1
- package/package.json +5 -5
- package/src/Viewer/Commands/ApplyModelTransform.ts +2 -4
- package/src/Viewer/Markup/Api/Impl/Konva/KonvaCloud.ts +1 -1
- package/src/index.ts +3 -1
package/lib/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inweb/viewer-visualize",
|
|
3
|
-
"version": "25.3.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "25.3.17",
|
|
4
|
+
"description": "3D CAD and BIM data Viewer powered by Visualize",
|
|
5
5
|
"homepage": "https://cloud.opendesign.com/docs/index.html",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
7
7
|
"author": "Open Design Alliance",
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
"test": "karma start karma.conf.js"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@inweb/client": "^25.3.
|
|
32
|
-
"@inweb/eventemitter2": "^25.3.
|
|
33
|
-
"@inweb/viewer-core": "^25.3.
|
|
31
|
+
"@inweb/client": "^25.3.13",
|
|
32
|
+
"@inweb/eventemitter2": "^25.3.13",
|
|
33
|
+
"@inweb/viewer-core": "^25.3.13"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"canvas": "^2.11.2",
|
|
@@ -34,9 +34,7 @@ export const composeMatrixFromTransform = (translate, rotate, scale, modelCenter
|
|
|
34
34
|
|
|
35
35
|
function applyModelTransform(viewer: Viewer, model: Model | File | Assembly) {
|
|
36
36
|
if (!viewer.visualizeJs) return;
|
|
37
|
-
|
|
38
|
-
const assembly = model instanceof Model ? model.assembly : model;
|
|
39
|
-
if (!(assembly instanceof Assembly)) return;
|
|
37
|
+
if (!model.getModelTransformMatrix) return; // Model.getModelTransformMatrix() since 24.3.14
|
|
40
38
|
|
|
41
39
|
const visLib = viewer.visLib();
|
|
42
40
|
const visViewer = visLib.getViewer();
|
|
@@ -45,7 +43,7 @@ function applyModelTransform(viewer: Viewer, model: Model | File | Assembly) {
|
|
|
45
43
|
for (; !modelItr.done(); modelItr.step()) {
|
|
46
44
|
const modelPtr = modelItr.getModel();
|
|
47
45
|
|
|
48
|
-
const transform =
|
|
46
|
+
const transform = model.getModelTransformMatrix(modelPtr.getDatabaseHandle());
|
|
49
47
|
if (transform) {
|
|
50
48
|
const extents = modelPtr.getExtents();
|
|
51
49
|
const matrix = composeMatrixFromTransform(
|
|
@@ -31,7 +31,7 @@ export class KonvaCloud implements IMarkupCloud, IMarkupColorable {
|
|
|
31
31
|
width: params.width ?? 200,
|
|
32
32
|
height: params.height ?? 200,
|
|
33
33
|
stroke: params.color ?? "#ff0000",
|
|
34
|
-
strokeWidth: params.lineWidth ??
|
|
34
|
+
strokeWidth: params.lineWidth ?? 4,
|
|
35
35
|
draggable: true,
|
|
36
36
|
strokeScaleEnabled: false,
|
|
37
37
|
globalCompositeOperation: "source-over",
|
package/src/index.ts
CHANGED
|
@@ -21,6 +21,8 @@
|
|
|
21
21
|
// acknowledge and accept the above terms.
|
|
22
22
|
///////////////////////////////////////////////////////////////////////////////
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
import "./Viewer/Commands";
|
|
25
|
+
|
|
26
|
+
export { commands, Options } from "@inweb/viewer-core";
|
|
25
27
|
export { Viewer } from "./Viewer/Viewer";
|
|
26
28
|
export { OdBaseDragger } from "./Viewer/Draggers/Common/OdBaseDragger";
|