Make mesh visibility options available from context menu #102
Add the possibility to isolate mesh #103
This commit is contained in:
parent
55aafe8d88
commit
11f4579693
1
website/assets/images/context/deisolate.svg
Normal file
1
website/assets/images/context/deisolate.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg viewBox="0 0 18 18" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="#838383" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" style="stroke:#263238;stroke-width:1;stroke-opacity:1;fill:none;fill-opacity:1" cy="4.5" cx="4.5" r="3"/><circle fill="none" stroke="#838383" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" style="stroke:#263238;stroke-width:1;stroke-opacity:1" cy="13.5" cx="4.5" r="3"/><circle fill="none" stroke="#838383" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" style="stroke:#263238;stroke-width:1;stroke-opacity:1" cy="13.5" cx="13.5" r="3"/><circle fill="none" stroke="#838383" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" style="stroke:#263238;stroke-width:1;stroke-opacity:1" cy="4.5" cx="13.5" r="3"/></svg>
|
||||
|
After Width: | Height: | Size: 864 B |
1
website/assets/images/context/fit.svg
Normal file
1
website/assets/images/context/fit.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" xml:space="preserve"><path fill="none" stroke="#263238" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="M1.5 5.5v-4h4m11 4v-4h-4m-11 11v4h4m11-4v4h-4m-11-15L6 6m10.5-4.5L12 6M1.5 16.5 6 12m10.5 4.5L12 12"/></svg>
|
||||
|
After Width: | Height: | Size: 297 B |
1
website/assets/images/context/hide.svg
Normal file
1
website/assets/images/context/hide.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg viewBox="0 0 18 18" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path fill="none" stroke="#838383" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="M.5 9c6-6 11-6 17 0M.5 9c6 6 11 6 17 0m-16 6.5 15-13" style="stroke:#263238;stroke-opacity:1"/></svg>
|
||||
|
After Width: | Height: | Size: 290 B |
1
website/assets/images/context/isolate.svg
Normal file
1
website/assets/images/context/isolate.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg viewBox="0 0 18 18" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><circle fill="none" stroke="#838383" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" style="stroke:#263238;stroke-width:1;stroke-opacity:1;fill:#263238;fill-opacity:1" cy="4.5" cx="4.5" r="3"/><circle fill="none" stroke="#838383" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" style="stroke:#263238;stroke-width:1;stroke-opacity:1" cy="13.5" cx="4.5" r="3"/><circle fill="none" stroke="#838383" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" style="stroke:#263238;stroke-width:1;stroke-opacity:1" cy="13.5" cx="13.5" r="3"/><circle fill="none" stroke="#838383" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" style="stroke:#263238;stroke-width:1;stroke-opacity:1" cy="4.5" cx="13.5" r="3"/></svg>
|
||||
|
After Width: | Height: | Size: 867 B |
1
website/assets/images/context/show.svg
Normal file
1
website/assets/images/context/show.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg viewBox="0 0 18 18" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path fill="none" stroke="#838383" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" d="M.5 9c6-6 11-6 17 0M.5 9c6 6 11 6 17 0" style="stroke:#263238;stroke-opacity:1"/><circle fill="none" stroke="#838383" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="10" cx="9" cy="8" r="3.5" style="stroke:#263238;stroke-opacity:1"/></svg>
|
||||
|
After Width: | Height: | Size: 446 B |
@ -1,5 +1,4 @@
|
||||
OV.FeatureSet =
|
||||
{
|
||||
SettingsPanel : false,
|
||||
ContextMenu : false
|
||||
SettingsPanel : false
|
||||
};
|
||||
|
||||
@ -594,6 +594,7 @@ div.ov_popup div.ov_popup_list_item
|
||||
div.ov_popup img.ov_popup_list_item_icon
|
||||
{
|
||||
margin-right: 10px;
|
||||
margin-top: 2px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
|
||||
@ -144,15 +144,12 @@ OV.Website = class
|
||||
|
||||
OnModelContextMenu (globalMouseCoordinates, mouseCoordinates)
|
||||
{
|
||||
if (!OV.FeatureSet.ContextMenu) {
|
||||
return;
|
||||
}
|
||||
|
||||
let meshUserData = this.viewer.GetMeshUserDataUnderMouse (mouseCoordinates);
|
||||
let items = [];
|
||||
if (meshUserData === null) {
|
||||
items.push ({
|
||||
name : 'Fit model to window',
|
||||
icon : 'assets/images/context/fit.svg',
|
||||
onClick : () => {
|
||||
this.FitModelToWindow (false);
|
||||
}
|
||||
@ -160,6 +157,7 @@ OV.Website = class
|
||||
if (this.navigator.HasHiddenMesh ()) {
|
||||
items.push ({
|
||||
name : 'Show all meshes',
|
||||
icon : 'assets/images/context/show.svg',
|
||||
onClick : () => {
|
||||
this.navigator.ShowAllMeshes ();
|
||||
}
|
||||
@ -170,18 +168,21 @@ OV.Website = class
|
||||
let isMeshIsolated = this.navigator.IsMeshIsolated (meshIndex);
|
||||
items.push ({
|
||||
name : 'Hide mesh',
|
||||
icon : 'assets/images/context/hide.svg',
|
||||
onClick : () => {
|
||||
this.navigator.ToggleMeshVisibility (meshIndex);
|
||||
}
|
||||
});
|
||||
items.push ({
|
||||
name : 'Fit mesh to window',
|
||||
icon : 'assets/images/context/fit.svg',
|
||||
onClick : () => {
|
||||
this.navigator.FitMeshToWindow (meshIndex);
|
||||
}
|
||||
});
|
||||
items.push ({
|
||||
name : isMeshIsolated ? 'Remove isolation' : 'Isolate mesh',
|
||||
icon : isMeshIsolated ? 'assets/images/context/deisolate.svg' : 'assets/images/context/isolate.svg',
|
||||
onClick : () => {
|
||||
this.navigator.IsolateMesh (meshIndex);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user