@inweb/viewer-visualize 25.8.9 → 25.8.11
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/dist/viewer-visualize.js +37 -42
- package/dist/viewer-visualize.js.map +1 -1
- package/dist/viewer-visualize.min.js +1 -1
- package/dist/viewer-visualize.module.js +34 -40
- package/dist/viewer-visualize.module.js.map +1 -1
- package/lib/Viewer/Viewer.d.ts +2 -2
- package/package.json +5 -5
- package/src/Viewer/Markup/Visualize/VisualizeMarkup.ts +7 -46
- package/src/Viewer/Viewer.ts +36 -3
package/dist/viewer-visualize.js
CHANGED
|
@@ -12801,10 +12801,9 @@
|
|
|
12801
12801
|
var _a, _b;
|
|
12802
12802
|
this._ratio = 1;
|
|
12803
12803
|
if (ref) {
|
|
12804
|
-
if (ref.height() === 0 || ref.width() === 0) return;
|
|
12805
12804
|
this._ref = ref;
|
|
12806
12805
|
this._canvasImage = ref.image();
|
|
12807
|
-
this._ratio = this._ref.height() / this._ref.width();
|
|
12806
|
+
this._ratio = this._ref.height() === 0 || this._ref.width() === 0 ? 1 : this._ref.height() / this._ref.width();
|
|
12808
12807
|
return;
|
|
12809
12808
|
}
|
|
12810
12809
|
if (!params || !params.position || !params.src) return;
|
|
@@ -16389,7 +16388,6 @@
|
|
|
16389
16388
|
}
|
|
16390
16389
|
}
|
|
16391
16390
|
|
|
16392
|
-
const OVERLAY_VIEW_NAME = "$OVERLAY_VIEW_NAME";
|
|
16393
16391
|
class VisualizeMarkup {
|
|
16394
16392
|
constructor() {
|
|
16395
16393
|
this._markupColor = { r: 255, g: 0, b: 0 };
|
|
@@ -16402,31 +16400,7 @@
|
|
|
16402
16400
|
this._viewer.registerDragger("Text", OdaTextDragger);
|
|
16403
16401
|
}
|
|
16404
16402
|
dispose() { }
|
|
16405
|
-
syncOverlay() {
|
|
16406
|
-
if (!this._viewer.visualizeJs)
|
|
16407
|
-
return;
|
|
16408
|
-
const visViewer = this._viewer.visViewer();
|
|
16409
|
-
const activeView = visViewer.activeView;
|
|
16410
|
-
let overlayView = visViewer.getViewByName(OVERLAY_VIEW_NAME);
|
|
16411
|
-
if (!overlayView) {
|
|
16412
|
-
const overlayModel = visViewer.getMarkupModel();
|
|
16413
|
-
const pDevice = visViewer.getActiveDevice();
|
|
16414
|
-
overlayView = pDevice.createView(OVERLAY_VIEW_NAME, false);
|
|
16415
|
-
overlayView.addModel(overlayModel);
|
|
16416
|
-
activeView.addSibling(overlayView);
|
|
16417
|
-
pDevice.addView(overlayView);
|
|
16418
|
-
}
|
|
16419
|
-
overlayView.viewPosition = activeView.viewPosition;
|
|
16420
|
-
overlayView.viewTarget = activeView.viewTarget;
|
|
16421
|
-
overlayView.upVector = activeView.upVector;
|
|
16422
|
-
overlayView.viewFieldWidth = activeView.viewFieldWidth;
|
|
16423
|
-
overlayView.viewFieldHeight = activeView.viewFieldHeight;
|
|
16424
|
-
const viewPort = overlayView.getViewport();
|
|
16425
|
-
overlayView.setViewport(viewPort.lowerLeft, viewPort.upperRight);
|
|
16426
|
-
overlayView.vportRect = activeView.vportRect;
|
|
16427
|
-
this._viewer.update();
|
|
16428
|
-
return overlayView;
|
|
16429
|
-
}
|
|
16403
|
+
syncOverlay() { }
|
|
16430
16404
|
clearOverlay() {
|
|
16431
16405
|
if (!this._viewer.visualizeJs)
|
|
16432
16406
|
return;
|
|
@@ -16434,7 +16408,6 @@
|
|
|
16434
16408
|
const model = visViewer.getMarkupModel();
|
|
16435
16409
|
model.clearEntities();
|
|
16436
16410
|
model.delete();
|
|
16437
|
-
this._viewer.update();
|
|
16438
16411
|
}
|
|
16439
16412
|
getMarkupColor() {
|
|
16440
16413
|
return this._markupColor;
|
|
@@ -16572,23 +16545,19 @@
|
|
|
16572
16545
|
return viewpoint;
|
|
16573
16546
|
}
|
|
16574
16547
|
enableEditMode(mode) {
|
|
16575
|
-
|
|
16548
|
+
return this;
|
|
16576
16549
|
}
|
|
16577
16550
|
createObject(type, params) {
|
|
16578
|
-
|
|
16551
|
+
return undefined;
|
|
16579
16552
|
}
|
|
16580
16553
|
getObjects() {
|
|
16581
|
-
|
|
16554
|
+
return [];
|
|
16582
16555
|
}
|
|
16583
16556
|
getSelectedObjects() {
|
|
16584
|
-
|
|
16585
|
-
}
|
|
16586
|
-
selectObjects(objects) {
|
|
16587
|
-
throw new Error("Not implemented yet");
|
|
16588
|
-
}
|
|
16589
|
-
clearSelected() {
|
|
16590
|
-
throw new Error("Not implemented yet");
|
|
16557
|
+
return [];
|
|
16591
16558
|
}
|
|
16559
|
+
selectObjects(objects) { }
|
|
16560
|
+
clearSelected() { }
|
|
16592
16561
|
}
|
|
16593
16562
|
|
|
16594
16563
|
///////////////////////////////////////////////////////////////////////////////
|
|
@@ -16619,6 +16588,7 @@
|
|
|
16619
16588
|
}
|
|
16620
16589
|
|
|
16621
16590
|
///////////////////////////////////////////////////////////////////////////////
|
|
16591
|
+
const OVERLAY_VIEW_NAME = "$OVERLAY_VIEW_NAME";
|
|
16622
16592
|
const isExist = (value) => value !== undefined && value !== null;
|
|
16623
16593
|
/**
|
|
16624
16594
|
* The `Client.js` library class that provides methods to integrate with the
|
|
@@ -17144,16 +17114,41 @@
|
|
|
17144
17114
|
this.update();
|
|
17145
17115
|
}
|
|
17146
17116
|
/**
|
|
17147
|
-
*
|
|
17117
|
+
* Clear overlay view.
|
|
17148
17118
|
*/
|
|
17149
17119
|
clearOverlay() {
|
|
17120
|
+
if (!this.visualizeJs)
|
|
17121
|
+
return;
|
|
17150
17122
|
this._markup.clearOverlay();
|
|
17123
|
+
this.update();
|
|
17151
17124
|
}
|
|
17152
17125
|
/**
|
|
17153
|
-
*
|
|
17126
|
+
* Create overlay view.
|
|
17154
17127
|
*/
|
|
17155
17128
|
syncOverlay() {
|
|
17156
|
-
|
|
17129
|
+
if (!this.visualizeJs)
|
|
17130
|
+
return;
|
|
17131
|
+
const visViewer = this.visViewer();
|
|
17132
|
+
const activeView = visViewer.activeView;
|
|
17133
|
+
let overlayView = visViewer.getViewByName(OVERLAY_VIEW_NAME);
|
|
17134
|
+
if (!overlayView) {
|
|
17135
|
+
const markupModel = visViewer.getMarkupModel();
|
|
17136
|
+
const pDevice = visViewer.getActiveDevice();
|
|
17137
|
+
overlayView = pDevice.createView(OVERLAY_VIEW_NAME, false);
|
|
17138
|
+
overlayView.addModel(markupModel);
|
|
17139
|
+
activeView.addSibling(overlayView);
|
|
17140
|
+
pDevice.addView(overlayView);
|
|
17141
|
+
}
|
|
17142
|
+
overlayView.viewPosition = activeView.viewPosition;
|
|
17143
|
+
overlayView.viewTarget = activeView.viewTarget;
|
|
17144
|
+
overlayView.upVector = activeView.upVector;
|
|
17145
|
+
overlayView.viewFieldWidth = activeView.viewFieldWidth;
|
|
17146
|
+
overlayView.viewFieldHeight = activeView.viewFieldHeight;
|
|
17147
|
+
const viewPort = overlayView.getViewport();
|
|
17148
|
+
overlayView.setViewport(viewPort.lowerLeft, viewPort.upperRight);
|
|
17149
|
+
overlayView.vportRect = activeView.vportRect;
|
|
17150
|
+
this._markup.syncOverlay();
|
|
17151
|
+
this.update();
|
|
17157
17152
|
}
|
|
17158
17153
|
/**
|
|
17159
17154
|
* Returns `true` if current drawing is 3D drawing.
|