three-cad-viewer 1.5.6 → 1.5.7
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 +6 -0
- package/dist/three-cad-viewer.esm.js +21 -19
- package/dist/three-cad-viewer.esm.min.js +1 -1
- package/dist/three-cad-viewer.js +21 -19
- package/dist/three-cad-viewer.min.js +1 -1
- package/package.json +1 -1
- package/src/display.js +21 -19
package/Readme.md
CHANGED
|
@@ -51284,37 +51284,38 @@ function getIconBackground(theme, name) {
|
|
|
51284
51284
|
return `url(data:image/svg+xml;utf8,${escape(icons[name][theme])});`;
|
|
51285
51285
|
}
|
|
51286
51286
|
|
|
51287
|
-
|
|
51287
|
+
function TEMPLATE(id) {
|
|
51288
|
+
return `
|
|
51288
51289
|
<div class="tcv_cad_viewer">
|
|
51289
51290
|
<div class="tcv_cad_toolbar tcv_round">
|
|
51290
51291
|
<span class="tcv_tooltip" data-tooltip="Show coordinate axis">
|
|
51291
|
-
<input class='tcv_axes tcv_check' id='
|
|
51292
|
-
<label for='
|
|
51292
|
+
<input class='tcv_axes tcv_check' id='tcv_axes_${id}' type="checkbox" />
|
|
51293
|
+
<label for='tcv_axes_${id}' class="tcv_label">Axes</label>
|
|
51293
51294
|
</span>
|
|
51294
51295
|
<div class="tcv_grid-dropdown">
|
|
51295
51296
|
<input class='tcv_grid tcv_check' id='tcv_grid' type="checkbox" /><label for='tcv_grid'
|
|
51296
51297
|
class="tcv_label">Grid</label>
|
|
51297
51298
|
<div class="tcv_grid-content tcv_dropdown-content">
|
|
51298
51299
|
<div class="tcv_tooltip" data-tooltip="Show xy grid">
|
|
51299
|
-
<input class='tcv_grid-xy tcv_check tcv_dropdown-entry' id='tcv_grid-
|
|
51300
|
-
<label for='tcv_grid-
|
|
51300
|
+
<input class='tcv_grid-xy tcv_check tcv_dropdown-entry' id='tcv_grid-xy_${id}' type="checkbox">
|
|
51301
|
+
<label for='tcv_grid-xy_${id}' class="tcv_label tcv_dropdown-entry">xy</label>
|
|
51301
51302
|
</div>
|
|
51302
51303
|
<div class="tcv_tooltip" data-tooltip="Show xz grid">
|
|
51303
|
-
<input class='tcv_grid-xz tcv_check tcv_dropdown-entry' id='tcv_grid-
|
|
51304
|
-
<label for='tcv_grid-
|
|
51304
|
+
<input class='tcv_grid-xz tcv_check tcv_dropdown-entry' id='tcv_grid-xz_${id}' type="checkbox">
|
|
51305
|
+
<label for='tcv_grid-xz_${id}' class="tcv_label tcv_dropdown-entry">xz</label>
|
|
51305
51306
|
</div>
|
|
51306
51307
|
<div class="tcv_tooltip" data-tooltip="Show yz grid">
|
|
51307
|
-
<input class='tcv_grid-yz tcv_check tcv_dropdown-entry' id='tcv_grid-
|
|
51308
|
-
<label for='tcv_grid-
|
|
51308
|
+
<input class='tcv_grid-yz tcv_check tcv_dropdown-entry' id='tcv_grid-yz_${id}' type="checkbox">
|
|
51309
|
+
<label for='tcv_grid-yz_${id}' class="tcv_label tcv_dropdown-entry">yz</label>
|
|
51309
51310
|
</div>
|
|
51310
51311
|
</div>
|
|
51311
51312
|
</div>
|
|
51312
51313
|
<span class="tcv_tooltip" data-tooltip="Move center of axis and grid to (0,0,0)">
|
|
51313
|
-
<input class='tcv_axes0 tcv_check' id='
|
|
51314
|
+
<input class='tcv_axes0 tcv_check' id='tcv_axes0_${id}' type="checkbox" /><label for='tcv_axes0_${id}'
|
|
51314
51315
|
class="tcv_label">@0</label>
|
|
51315
51316
|
</span>
|
|
51316
51317
|
<span class="tcv_tooltip" data-tooltip="Toggle camera between orthographic and perspective view">
|
|
51317
|
-
<input class='tcv_ortho tcv_check' id='
|
|
51318
|
+
<input class='tcv_ortho tcv_check' id='tcv_ortho_${id}' type="checkbox" /><label for='tcv_ortho_${id}'
|
|
51318
51319
|
class="tcv_label">Ortho</label>
|
|
51319
51320
|
</span>
|
|
51320
51321
|
<span class="tcv_tooltip" data-tooltip="Reset view">
|
|
@@ -51348,17 +51349,17 @@ const TEMPLATE = `
|
|
|
51348
51349
|
<button class="tcv_more-btn">More<span class="tcv_more_icon">\u25BC</span></button>
|
|
51349
51350
|
<div class="tcv_more-content tcv_dropdown-content">
|
|
51350
51351
|
<div class="tcv_tooltip" data-tooltip="Toggle transparent objects">
|
|
51351
|
-
<input class='tcv_transparent tcv_check tcv_dropdown-entry' id='
|
|
51352
|
-
<label for='
|
|
51352
|
+
<input class='tcv_transparent tcv_check tcv_dropdown-entry' id='tcv_transparent_${id}' type="checkbox" />
|
|
51353
|
+
<label for='tcv_transparent_${id}' class="tcv_label tcv_dropdown-entry">Transparent</label>
|
|
51353
51354
|
</div>
|
|
51354
51355
|
<div class="tcv_tooltip" data-tooltip="Toggle black edges">
|
|
51355
|
-
<input class='tcv_black_edges tcv_check tcv_dropdown-entry' id='
|
|
51356
|
-
<label for='
|
|
51356
|
+
<input class='tcv_black_edges tcv_check tcv_dropdown-entry' id='tcv_black_edges_${id}' type="checkbox" />
|
|
51357
|
+
<label for='tcv_black_edges_${id}' class="tcv_label tcv_dropdown-entry">Black edges</label>
|
|
51357
51358
|
</div>
|
|
51358
51359
|
<div class="tcv_explode_widget tcv_tooltip"
|
|
51359
51360
|
data-tooltip="Explode assembly (@0 determines explosion center)">
|
|
51360
|
-
<input class='tcv_explode tcv_check tcv_dropdown-entry' id='
|
|
51361
|
-
<label for='
|
|
51361
|
+
<input class='tcv_explode tcv_check tcv_dropdown-entry' id='tcv_explode_${id}' type="checkbox" />
|
|
51362
|
+
<label for='tcv_explode_${id}' class="tcv_label tcv_dropdown-entry">Explode</label>
|
|
51362
51363
|
</div>
|
|
51363
51364
|
</div>
|
|
51364
51365
|
</div>
|
|
@@ -51535,6 +51536,7 @@ const TEMPLATE = `
|
|
|
51535
51536
|
</div>
|
|
51536
51537
|
</div>
|
|
51537
51538
|
`;
|
|
51539
|
+
}
|
|
51538
51540
|
|
|
51539
51541
|
function px(val) {
|
|
51540
51542
|
return `${val}px`;
|
|
@@ -51636,7 +51638,7 @@ class Display {
|
|
|
51636
51638
|
constructor(container, options) {
|
|
51637
51639
|
this.container = container;
|
|
51638
51640
|
|
|
51639
|
-
this.container.innerHTML = TEMPLATE;
|
|
51641
|
+
this.container.innerHTML = TEMPLATE(this.container.id);
|
|
51640
51642
|
this.cadBody = this._getElement("tcv_cad_body");
|
|
51641
51643
|
this.cadTool = this._getElement("tcv_cad_toolbar");
|
|
51642
51644
|
this.cadView = this._getElement("tcv_cad_view");
|
|
@@ -52455,7 +52457,7 @@ class Display {
|
|
|
52455
52457
|
glass: this._glassMode,
|
|
52456
52458
|
height: this.height,
|
|
52457
52459
|
tools: this.tools,
|
|
52458
|
-
treeWidth:
|
|
52460
|
+
treeWidth: flag ? 0 : this.treeWidth,
|
|
52459
52461
|
};
|
|
52460
52462
|
this.setSizes(options);
|
|
52461
52463
|
}
|