Merge remote-tracking branch 'origin/dev' into bim/fix/ifc_full_page_angular

pull/8063/head
ulferts 5 years ago
commit 27e86909e1
No known key found for this signature in database
GPG Key ID: A205708DE1284017
  1. 14
      frontend/npm-shrinkwrap.json
  2. 4
      frontend/package.json
  3. 1
      frontend/src/app/modules/ifc_models/ifc-viewer/ifc-viewer.component.ts
  4. 18
      frontend/src/app/modules/ifc_models/xeokit/xeokit-server.js
  5. 10
      modules/ifc_models/app/assets/stylesheets/ifc_viewer/context_menu.sass
  6. 3
      modules/ifc_models/app/assets/stylesheets/ifc_viewer/tabs.sass
  7. 13
      modules/ifc_models/app/helpers/ifc_models_helper.rb

@ -3883,16 +3883,16 @@
}
},
"@xeokit/xeokit-sdk": {
"version": "0.7.9",
"resolved": "https://registry.npmjs.org/@xeokit/xeokit-sdk/-/xeokit-sdk-0.7.9.tgz",
"integrity": "sha512-+MPFDs/z2r6i9ctD5+HFuwUym02bjXVkRzz4mpBDgGLKNI2ALxxi0Dt8gjnNjobZhAjvVn1t1x7jch72vlzUAA=="
"version": "0.8.8",
"resolved": "https://registry.npmjs.org/@xeokit/xeokit-sdk/-/xeokit-sdk-0.8.8.tgz",
"integrity": "sha512-e+HTZajykFolCeWm5CIT7HSzOYoRhCxbecpjsXlmfEUYeFZ2Rpxc8CbI/vo62DjwobjFOB/dtyz3xJ2uWkogGg=="
},
"@xeokit/xeokit-viewer": {
"version": "1.4.9",
"resolved": "https://registry.npmjs.org/@xeokit/xeokit-viewer/-/xeokit-viewer-1.4.9.tgz",
"integrity": "sha512-igIieHItb2TDWUSyW7stKqxlEBhdTeInYT+tL7tYVGYgPMVNkfPFG70ISSTE8Pv39vTuY1ENM3zaqpxmf8h1Qg==",
"version": "1.6.4",
"resolved": "https://registry.npmjs.org/@xeokit/xeokit-viewer/-/xeokit-viewer-1.6.4.tgz",
"integrity": "sha512-HgY9ceC+Nb6pBxCKlpcQo7cQearilXyVjPI9u5r27ZtHxkm1JDaAVInrDUTsFcpOyL2JBE17Xyb5kfzv9/FujQ==",
"requires": {
"@xeokit/xeokit-sdk": "^0.7.9"
"@xeokit/xeokit-sdk": "^0.8.8"
}
},
"@xtuc/ieee754": {

@ -68,8 +68,8 @@
"@types/webpack-env": "^1.14.0",
"@uirouter/angular": "^4.0.0",
"@uirouter/core": "^5.0.23",
"@xeokit/xeokit-sdk": "^0.7.9",
"@xeokit/xeokit-viewer": "^1.4.9",
"@xeokit/xeokit-sdk": "^0.8.8",
"@xeokit/xeokit-viewer": "^1.6.4",
"URIjs": "^1.14.1",
"amdefine": "^1.0.0",
"angular-dragula": "^1.2.8",

@ -43,7 +43,6 @@ import {GonService} from "core-app/modules/common/gon/gon.service";
</div>
<canvas class="ifc-model-viewer--nav-cube-canvas"></canvas>
<canvas class="ifc-model-viewer--section-planes-overview-canvas"></canvas>
`
})
export class IFCViewerComponent implements OnInit {

@ -19,7 +19,7 @@ class XeokitServer {
* @param error
*/
getProjects(done, _error) {
done(window.gon.ifc_models.projects);
done({ projects: window.gon.ifc_models.projects });
}
/**
@ -28,8 +28,20 @@ class XeokitServer {
* @param done
* @param error
*/
getProject(_projectId, done, _error) {
done({ models: window.gon.ifc_models.models });
getProject(projectData, done, _error) {
var manifestData = {
id: projectData[0].id,
name: projectData[0].name,
models: window.gon.ifc_models.models,
viewerContent: {
modelsLoaded: window.gon.ifc_models.default_models
},
viewerConfigs: {
saoEnabled: true // Needs to be enabled by default if we want to use it selectively on the available models.
}
};
done(manifestData);
}
/**

@ -15,4 +15,12 @@
li
@extend .menu-item
border-bottom-color: rgba(0, 0, 0, 0.2) !important
border-bottom-color: rgba(0, 0, 0, 0.2) !important
LI.disabled
color: #999999
cursor: default !important
&:hover
background-color: initial !important
color: #999999 !important

@ -106,5 +106,8 @@ $pill-padding-left: 8px
input
margin-right: 5px
span
cursor: pointer
.xeokit-tree-panel > ul
padding-left: 0

@ -4,6 +4,7 @@ module IFCModelsHelper
gon.ifc_models = {
models: gon_ifc_model_models(all_converted_models, models_to_load),
default_models: gon_ifc_default_models(all_converted_models, models_to_load),
projects: [{ id: @project.identifier, name: @project.name }],
xkt_attachment_ids: gon_ifc_model_xkt_attachment_ids(all_converted_models),
metadata_attachment_ids: gon_ifc_model_metadata_attachment_ids(all_converted_models),
@ -24,11 +25,21 @@ module IFCModelsHelper
{
id: ifc_model.id,
name: ifc_model.title,
default: models_to_load.include?(ifc_model)
saoEnabled: models_to_load.include?(ifc_model)
}
end
end
def gon_ifc_default_models(all_models, models_to_load)
all_converted_models = converted_ifc_models(all_models)
default_models = []
all_converted_models.map do |ifc_model|
default_models << ifc_model.id.to_s if models_to_load.include?(ifc_model)
end
default_models
end
def gon_ifc_model_xkt_attachment_ids(models)
Hash[models.map { |model| [model.id, model.xkt_attachment.id] }]
end

Loading…
Cancel
Save