@vitrosoftware/common-ui-ts 1.1.121 → 1.1.122
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/index.js +1 -1
- package/lib/xeokit/xeokit-sdk-2.6.10.es.js +136629 -0
- package/lib/xeokit/xeokit-sdk-2.6.10.min.es.js +299 -0
- package/package.json +1 -1
- package/src/controls/BimViewer/js/bim-viewer-models.js +93 -0
- package/src/controls/BimViewer/js/bim-viewer.js +194 -5
- package/src/controls/PdfViewer/js/pdf-viewer.js +1 -1
- package/dist/src/controls/ActionHandler/ActionInfo.d.ts +0 -12
- package/dist/src/controls/ActionHandler/ActionInfoItem.d.ts +0 -13
- package/dist/src/controls/ActionHandler/UpdatingPopover.d.ts +0 -2
- package/dist/src/controls/Dialog/DialogButton.d.ts +0 -8
- package/dist/src/controls/Dialog/DialogCloseButton.d.ts +0 -8
- package/dist/src/controls/Icon/Icon.d.ts +0 -11
- package/dist/src/controls/Search/Input.d.ts +0 -21
- package/dist/src/controls/Search/SearchConstants.d.ts +0 -4
package/package.json
CHANGED
|
@@ -28,6 +28,99 @@
|
|
|
28
28
|
});
|
|
29
29
|
},
|
|
30
30
|
|
|
31
|
+
GetSmallModel: async function (viewer, version, signal, callback, error) {
|
|
32
|
+
function ConvertToInt32(buffer) {
|
|
33
|
+
return new DataView(buffer).getInt32(0, true);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
var webRelativeUrl = BIMCommon.CreateWebServerUrl();
|
|
37
|
+
var paramObj = {};
|
|
38
|
+
|
|
39
|
+
paramObj.itemId = BIMCommon.FileItemId;
|
|
40
|
+
paramObj.version = version;
|
|
41
|
+
paramObj.canvasBoundary = viewer.scene.canvas.boundary;
|
|
42
|
+
paramObj.viewMatrix = Array.from(viewer.camera.viewMatrix);
|
|
43
|
+
paramObj.projMatrix = Array.from(viewer.camera.projMatrix);
|
|
44
|
+
paramObj.eye = Array.from(viewer.camera.eye);
|
|
45
|
+
|
|
46
|
+
try
|
|
47
|
+
{
|
|
48
|
+
let response = await fetch(webRelativeUrl + "/bimViewer/api/Scene/SmallModel", {
|
|
49
|
+
method: 'POST',
|
|
50
|
+
headers: {
|
|
51
|
+
'Content-Type': 'application/json'
|
|
52
|
+
},
|
|
53
|
+
body: JSON.stringify(paramObj),
|
|
54
|
+
signal: signal
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
if (!response.ok) {
|
|
59
|
+
console.error(response.status);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const reader = response.body.getReader({ mode: "byob" });
|
|
64
|
+
|
|
65
|
+
async function readModel(reader) {
|
|
66
|
+
var chunkCountBuffer = await readStream(reader, 4);
|
|
67
|
+
|
|
68
|
+
if (!chunkCountBuffer) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
var chankCount = ConvertToInt32(chunkCountBuffer);
|
|
73
|
+
|
|
74
|
+
for (var i = 0; i < chankCount; i++) {
|
|
75
|
+
var chunkSizeBuffer = await readStream(reader, 4);
|
|
76
|
+
|
|
77
|
+
if (!chunkSizeBuffer) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
var chakSize = ConvertToInt32(chunkSizeBuffer);
|
|
82
|
+
|
|
83
|
+
if (chakSize != 0) {
|
|
84
|
+
var chunkBuffer = await readStream(reader, chakSize);
|
|
85
|
+
|
|
86
|
+
if (!chunkBuffer) {
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
callback(chunkBuffer, i);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
async function readStream(reader, size) {
|
|
96
|
+
var buffer = new ArrayBuffer(size);
|
|
97
|
+
let bytesReceived = 0;
|
|
98
|
+
|
|
99
|
+
do {
|
|
100
|
+
var { done, value } = await reader.read(new Uint8Array(buffer, bytesReceived, buffer.byteLength - bytesReceived));
|
|
101
|
+
|
|
102
|
+
if (signal.aborted) {
|
|
103
|
+
console.log('The download was aborted');
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
if (!done ?? value) {
|
|
108
|
+
bytesReceived += value.byteLength;
|
|
109
|
+
buffer = value.buffer;
|
|
110
|
+
} else {
|
|
111
|
+
return false;
|
|
112
|
+
}
|
|
113
|
+
} while (bytesReceived < size);
|
|
114
|
+
|
|
115
|
+
return buffer;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
await readModel(reader);
|
|
119
|
+
} catch (e) {
|
|
120
|
+
console.error('Error receiving files:', e);
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
|
|
31
124
|
GetURLParameter: function(sParam) {
|
|
32
125
|
var sPageURL = window.location.search.substring(1);
|
|
33
126
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { BIMModel, BIMCommon, BIMAnnotation } from '/resource/bimViewer/js/bim-viewer-models.js?version=1.1.
|
|
1
|
+
import { BIMModel, BIMCommon, BIMAnnotation } from '/resource/bimViewer/js/bim-viewer-models.js?version=1.1.122';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
Viewer, XKTLoaderPlugin, NavCubePlugin, SectionPlanesPlugin, math, BCFViewpointsPlugin, AnnotationsPlugin,
|
|
5
5
|
ContextMenu, TreeViewPlugin, StoreyViewsPlugin, AngleMeasurementsPlugin, CameraMemento, DistanceMeasurementsPlugin,
|
|
6
|
-
GLTFLoaderPlugin, utils, FastNavPlugin, MetaObject
|
|
6
|
+
GLTFLoaderPlugin, utils, FastNavPlugin, MetaObject, parsers
|
|
7
7
|
}
|
|
8
|
-
from '/resource/bimViewer/js/xeokit/xeokit-sdk.es.js?version=1.1.
|
|
8
|
+
from '/resource/bimViewer/js/xeokit/xeokit-sdk.es.js?version=1.1.122';
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
const processByChildIdList = (treeViewNode, event) => {
|
|
@@ -624,6 +624,120 @@ class VitroTreeViewPlugin extends TreeViewPlugin
|
|
|
624
624
|
}
|
|
625
625
|
}
|
|
626
626
|
|
|
627
|
+
class VitroXKTLoaderPlugin extends XKTLoaderPlugin {
|
|
628
|
+
constructor(viewer, cfg = {}) {
|
|
629
|
+
super(viewer, cfg);
|
|
630
|
+
|
|
631
|
+
this._delayBeforeRestore = (cfg.delayBeforeRestore !== false);
|
|
632
|
+
this._delayBeforeRestoreSeconds = cfg.delayBeforeRestoreSeconds || 1.0;
|
|
633
|
+
this.smallModelList = [];
|
|
634
|
+
let timer = this._delayBeforeRestoreSeconds * 1000;
|
|
635
|
+
let fastMode = false;
|
|
636
|
+
|
|
637
|
+
const culledSmallModelList = () => {
|
|
638
|
+
timer = (this._delayBeforeRestoreSeconds * 1000);
|
|
639
|
+
if (!fastMode) {
|
|
640
|
+
this.culledModels();
|
|
641
|
+
fastMode = true;
|
|
642
|
+
}
|
|
643
|
+
};
|
|
644
|
+
|
|
645
|
+
const loadSmallModels = () => {
|
|
646
|
+
this.loadData();
|
|
647
|
+
};
|
|
648
|
+
|
|
649
|
+
this._onCanvasBoundary = viewer.scene.canvas.on("boundary", culledSmallModelList);
|
|
650
|
+
this._onCameraMatrix = viewer.scene.camera.on("matrix", culledSmallModelList);
|
|
651
|
+
|
|
652
|
+
this._onSceneTick = viewer.scene.on("tick", (tickEvent) => {
|
|
653
|
+
if (!fastMode) {
|
|
654
|
+
return;
|
|
655
|
+
}
|
|
656
|
+
if (this._delayBeforeRestoreSeconds * 1000 > tickEvent.deltaTime) {
|
|
657
|
+
timer -= tickEvent.deltaTime;
|
|
658
|
+
if ((!this._delayBeforeRestore) || timer <= 0) {
|
|
659
|
+
loadSmallModels();
|
|
660
|
+
fastMode = false;
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
});
|
|
664
|
+
|
|
665
|
+
let down = false;
|
|
666
|
+
|
|
667
|
+
this._onSceneMouseDown = viewer.scene.input.on("mousedown", () => {
|
|
668
|
+
down = true;
|
|
669
|
+
});
|
|
670
|
+
|
|
671
|
+
this._onSceneMouseUp = viewer.scene.input.on("mouseup", () => {
|
|
672
|
+
down = false;
|
|
673
|
+
});
|
|
674
|
+
|
|
675
|
+
this._onSceneMouseMove = viewer.scene.input.on("mousemove", () => {
|
|
676
|
+
if (!down) {
|
|
677
|
+
return;
|
|
678
|
+
}
|
|
679
|
+
culledSmallModelList();
|
|
680
|
+
});
|
|
681
|
+
|
|
682
|
+
this.scene = viewer.scene;
|
|
683
|
+
window.VitroXKTLoaderPlugin = this;
|
|
684
|
+
|
|
685
|
+
this.startSmallLoad = false;
|
|
686
|
+
this.isDeleteModelList = false;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
culledModels() {
|
|
690
|
+
if (this.controller) {
|
|
691
|
+
this.controller.abort();
|
|
692
|
+
}
|
|
693
|
+
|
|
694
|
+
this.smallModelList.forEach(model => {
|
|
695
|
+
model.culled = true;
|
|
696
|
+
});
|
|
697
|
+
|
|
698
|
+
this.isDeleteModelList = true;
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
deleteModels() {
|
|
704
|
+
this.smallModelList.forEach(model => {
|
|
705
|
+
model.destroy();
|
|
706
|
+
});
|
|
707
|
+
|
|
708
|
+
this.smallModelList = [];
|
|
709
|
+
this.isDeleteModelList = false;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
loadSmallPart(data, numPart) {
|
|
713
|
+
|
|
714
|
+
if (this.isDeleteModelList) {
|
|
715
|
+
this.deleteModels();
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
var sceneModel = this.load({
|
|
719
|
+
id: Date.now() + '_' + this.version + '_' + numPart,
|
|
720
|
+
xkt: data,
|
|
721
|
+
edges: true,
|
|
722
|
+
backfaces: true,
|
|
723
|
+
});
|
|
724
|
+
|
|
725
|
+
this.smallModelList.push(sceneModel);
|
|
726
|
+
|
|
727
|
+
sceneModel.on('loaded', () => {
|
|
728
|
+
sceneModel.IsRunning = false;
|
|
729
|
+
});
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
|
|
733
|
+
loadData() {
|
|
734
|
+
this.controller = new AbortController();
|
|
735
|
+
if (this.startSmallLoad) {
|
|
736
|
+
BIMCommon.GetSmallModel(this.viewer.scene, this.version, this.controller.signal, this.loadSmallPart.bind(this));
|
|
737
|
+
}
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
|
|
627
741
|
/*! jquery-dialogextend 2.0.3 2014-07-08 */
|
|
628
742
|
(function(){var i;i=jQuery,i.widget("ui.dialogExtend",{version:"2.0.0",modes:{},options:{closable:!0,dblclick:!1,titlebar:!1,icons:{close:"ui-icon-closethick",restore:"ui-icon-newwin"},load:null,beforeRestore:null,restore:null},_create:function(){return this._state="normal",i(this.element[0]).data("ui-dialog")||i.error("jQuery.dialogExtend Error : Only jQuery UI Dialog element is accepted"),this._verifyOptions(),this._initStyles(),this._initButtons(),this._initTitleBar(),this._setState("normal"),this._on("load",function(i){return console.log("test",i)}),this._trigger("load")},_setState:function(t){return i(this.element[0]).removeClass("ui-dialog-"+this._state).addClass("ui-dialog-"+t),this._state=t},_verifyOptions:function(){var t,e,o;!this.options.dblclick||this.options.dblclick in this.modes||(i.error("jQuery.dialogExtend Error : Invalid <dblclick> value '"+this.options.dblclick+"'"),this.options.dblclick=!1),this.options.titlebar&&"none"!==(e=this.options.titlebar)&&"transparent"!==e&&(i.error("jQuery.dialogExtend Error : Invalid <titlebar> value '"+this.options.titlebar+"'"),this.options.titlebar=!1),o=[];for(t in this.modes)this["_verifyOptions_"+t]?o.push(this["_verifyOptions_"+t]()):o.push(void 0);return o},_initStyles:function(){var t,e,o;i(".dialog-extend-css").length||(e="",e+='<style class="dialog-extend-css" type="text/css">',e+=".ui-dialog .ui-dialog-titlebar-buttonpane>a { float: right; }",e+=".ui-dialog .ui-dialog-titlebar-restore { width: 19px; height: 18px; }",e+=".ui-dialog .ui-dialog-titlebar-restore span { display: block; margin: 1px; }",e+=".ui-dialog .ui-dialog-titlebar-restore:hover,",e+=".ui-dialog .ui-dialog-titlebar-restore:focus { padding: 0; }",e+=".ui-dialog .ui-dialog-titlebar ::selection { background-color: transparent; }",e+="</style>",i(e).appendTo("body")),o=[];for(t in this.modes)o.push(this["_initStyles_"+t]());return o},_initButtons:function(){var t,e,o,n,a,l=this;n=i(this.element[0]).dialog("widget").find(".ui-dialog-titlebar"),t=i('<div class="ui-dialog-titlebar-buttonpane"></div>').appendTo(n),t.css({position:"absolute",top:"50%",right:"0.3em","margin-top":"-10px",height:"18px"}),n.find(".ui-dialog-titlebar-close").css({position:"relative","float":"right",top:"auto",right:"auto",margin:0}).find(".ui-icon").removeClass("ui-icon-closethick").addClass(this.options.icons.close).end().appendTo(t).end(),t.append('<a class="ui-dialog-titlebar-restore ui-corner-all ui-state-default" href="#"><span class="ui-icon '+this.options.icons.restore+'" title="restore">restore</span></a>').find(".ui-dialog-titlebar-restore").attr("role","button").mouseover(function(){return i(this).addClass("ui-state-hover")}).mouseout(function(){return i(this).removeClass("ui-state-hover")}).focus(function(){return i(this).addClass("ui-state-focus")}).blur(function(){return i(this).removeClass("ui-state-focus")}).end().find(".ui-dialog-titlebar-close").toggle(this.options.closable).end().find(".ui-dialog-titlebar-restore").hide().click(function(i){return i.preventDefault(),l.restore()}).end(),a=this.modes;for(o in a)e=a[o],this._initModuleButton(o,e);return n.dblclick(function(){return l.options.dblclick?"normal"!==l._state?l.restore():l[l.options.dblclick]():void 0}).select(function(){return!1})},_initModuleButton:function(t,e){var o,n=this;return o=i(this.element[0]).dialog("widget").find(".ui-dialog-titlebar-buttonpane"),o.append('<a class="ui-dialog-titlebar-'+t+' ui-corner-all ui-state-default" href="#" title="'+t+'"><span class="ui-icon '+this.options.icons[t]+'">'+t+"</span></a>").find(".ui-dialog-titlebar-"+t).attr("role","button").mouseover(function(){return i(this).addClass("ui-state-hover")}).mouseout(function(){return i(this).removeClass("ui-state-hover")}).focus(function(){return i(this).addClass("ui-state-focus")}).blur(function(){return i(this).removeClass("ui-state-focus")}).end().find(".ui-dialog-titlebar-"+t).toggle(this.options[e.option]).click(function(i){return i.preventDefault(),n[t]()}).end()},_initTitleBar:function(){var t;switch(this.options.titlebar){case!1:return 0;case"none":return i(this.element[0]).dialog("option","draggable")&&(t=i("<div />").addClass("ui-dialog-draggable-handle").css("cursor","move").height(5),i(this.element[0]).dialog("widget").prepend(t).draggable("option","handle",t)),i(this.element[0]).dialog("widget").find(".ui-dialog-titlebar").find(".ui-dialog-title").html(" ").end().css({"background-color":"transparent","background-image":"none",border:0,position:"absolute",right:0,top:0,"z-index":9999}).end();case"transparent":return i(this.element[0]).dialog("widget").find(".ui-dialog-titlebar").css({"background-color":"transparent","background-image":"none",border:0});default:return i.error("jQuery.dialogExtend Error : Invalid <titlebar> value '"+this.options.titlebar+"'")}},state:function(){return this._state},restore:function(){return this._trigger("beforeRestore"),this._restore(),this._toggleButtons(),this._trigger("restore")},_restore:function(){return"normal"!==this._state?(this["_restore_"+this._state](),this._setState("normal"),i(this.element[0]).dialog("widget").focus()):void 0},_saveSnapshot:function(){return"normal"===this._state?(this.original_config_resizable=i(this.element[0]).dialog("option","resizable"),this.original_config_draggable=i(this.element[0]).dialog("option","draggable"),this.original_size_height=i(this.element[0]).dialog("widget").outerHeight(),this.original_size_width=i(this.element[0]).dialog("option","width"),this.original_size_maxHeight=i(this.element[0]).dialog("option","maxHeight"),this.original_position_mode=i(this.element[0]).dialog("widget").css("position"),this.original_position_left=i(this.element[0]).dialog("widget").offset().left-i("body").scrollLeft(),this.original_position_top=i(this.element[0]).dialog("widget").offset().top-i("body").scrollTop(),this.original_titlebar_wrap=i(this.element[0]).dialog("widget").find(".ui-dialog-titlebar").css("white-space")):void 0},_loadSnapshot:function(){return{config:{resizable:this.original_config_resizable,draggable:this.original_config_draggable},size:{height:this.original_size_height,width:this.original_size_width,maxHeight:this.original_size_maxHeight},position:{mode:this.original_position_mode,left:this.original_position_left,top:this.original_position_top},titlebar:{wrap:this.original_titlebar_wrap}}},_toggleButtons:function(t){var e,o,n,a,l,s;n=t||this._state,i(this.element[0]).dialog("widget").find(".ui-dialog-titlebar-restore").toggle("normal"!==n).css({right:"1.4em"}).end(),a=this.modes;for(o in a)e=a[o],i(this.element[0]).dialog("widget").find(".ui-dialog-titlebar-"+o).toggle(n!==e.state&&this.options[e.option]);l=this.modes,s=[];for(o in l)e=l[o],e.state===n?s.push(i(this.element[0]).dialog("widget").find(".ui-dialog-titlebar-restore").insertAfter(i(this.element[0]).dialog("widget").find(".ui-dialog-titlebar-"+o)).end()):s.push(void 0);return s}})}).call(this),function(){var i;i=jQuery,i.extend(!0,i.ui.dialogExtend.prototype,{modes:{collapse:{option:"collapsable",state:"collapsed"}},options:{collapsable:!1,icons:{collapse:"ui-icon-triangle-1-s"},beforeCollapse:null,collapse:null},collapse:function(){var t,e;return t=i(this.element[0]).dialog("widget").find(".ui-dialog-titlebar").height()+15,this._trigger("beforeCollapse"),"normal"!==this._state&&this._restore(),this._saveSnapshot(),e=i(this.element[0]).dialog("widget").position(),i(this.element[0]).dialog("option",{resizable:!1,height:t,maxHeight:t,position:[e.left-i(document).scrollLeft(),e.top-i(document).scrollTop()]}).on("dialogclose",this._collapse_restore).hide().dialog("widget").find(".ui-dialog-buttonpane:visible").hide().end().find(".ui-dialog-titlebar").css("white-space","nowrap").end().find(".ui-dialog-content"),this._setState("collapsed"),this._toggleButtons(),this._trigger("collapse")},_restore_collapsed:function(){var t;return t=this._loadSnapshot(),i(this.element[0]).show().dialog("widget").find(".ui-dialog-buttonpane:hidden").show().end().find(".ui-dialog-titlebar").css("white-space",t.titlebar.wrap).end().find(".ui-dialog-content").dialog("option",{resizable:t.config.resizable,height:t.size.height,maxHeight:t.size.maxHeight}).off("dialogclose",this._collapse_restore)},_initStyles_collapse:function(){var t;return i(".dialog-extend-collapse-css").length?void 0:(t="",t+='<style class="dialog-extend-collapse-css" type="text/css">',t+=".ui-dialog .ui-dialog-titlebar-collapse { width: 19px; height: 18px; }",t+=".ui-dialog .ui-dialog-titlebar-collapse span { display: block; margin: 1px; }",t+=".ui-dialog .ui-dialog-titlebar-collapse:hover,",t+=".ui-dialog .ui-dialog-titlebar-collapse:focus { padding: 0; }",t+="</style>",i(t).appendTo("body"))},_collapse_restore:function(){return i(this).dialogExtend("restore")}})}.call(this),function(){var i;i=jQuery,i.extend(!0,i.ui.dialogExtend.prototype,{modes:{maximize:{option:"maximizable",state:"maximized"}},options:{maximizable:!1,icons:{maximize:"ui-icon-extlink"},beforeMaximize:null,maximize:null},maximize:function(){var t,e;return t=i(window).height()-11,e=i(window).width()-11,this._trigger("beforeMaximize"),"normal"!==this._state&&this._restore(),this._saveSnapshot(),i(this.element[0]).dialog("option","draggable")&&i(this.element[0]).dialog("widget").draggable("option","handle",null).find(".ui-dialog-draggable-handle").css("cursor","text").end(),i(this.element[0]).dialog("widget").css("position","fixed").find(".ui-dialog-content").show().dialog("widget").find(".ui-dialog-buttonpane").show().end().find(".ui-dialog-content").dialog("option",{resizable:!1,draggable:!1,height:t,width:e,position:{my:"left top",at:"left top",of:window}}),this._setState("maximized"),this._toggleButtons(),this._trigger("maximize")},_restore_maximized:function(){var t;return t=this._loadSnapshot(),i(this.element[0]).dialog("widget").css("position",t.position.mode).find(".ui-dialog-titlebar").css("white-space",t.titlebar.wrap).end().find(".ui-dialog-content").dialog("option",{resizable:t.config.resizable,draggable:t.config.draggable,height:t.size.height,width:t.size.width,maxHeight:t.size.maxHeight,position:{my:"left top",at:"left+"+t.position.left+" top+"+t.position.top,of:window}}),i(this.element[0]).dialog("option","draggable")?i(this.element[0]).dialog("widget").draggable("option","handle",i(this.element[0]).dialog("widget").find(".ui-dialog-draggable-handle").length?i(this.element[0]).dialog("widget").find(".ui-dialog-draggable-handle"):".ui-dialog-titlebar").find(".ui-dialog-draggable-handle").css("cursor","move"):void 0},_initStyles_maximize:function(){var t;return i(".dialog-extend-maximize-css").length?void 0:(t="",t+='<style class="dialog-extend-maximize-css" type="text/css">',t+=".ui-dialog .ui-dialog-titlebar-maximize { width: 19px; height: 18px; }",t+=".ui-dialog .ui-dialog-titlebar-maximize span { display: block; margin: 1px; }",t+=".ui-dialog .ui-dialog-titlebar-maximize:hover,",t+=".ui-dialog .ui-dialog-titlebar-maximize:focus { padding: 0; }",t+="</style>",i(t).appendTo("body"))}})}.call(this),function(){var i;i=jQuery,i.extend(!0,i.ui.dialogExtend.prototype,{modes:{minimize:{option:"minimizable",state:"minimized"}},options:{minimizable:!1,minimizeLocation:"left",icons:{minimize:"ui-icon-minus"},beforeMinimize:null,minimize:null},minimize:function(){var t,e,o;return this._trigger("beforeMinimize"),"normal"!==this._state&&this._restore(),o=200,i("#dialog-extend-fixed-container").length?e=i("#dialog-extend-fixed-container"):(e=i('<div id="dialog-extend-fixed-container"></div>').appendTo("body"),e.css({position:"fixed",bottom:1,left:1,right:1,"z-index":9999})),this._toggleButtons("minimized"),t=i(this.element[0]).dialog("widget").clone().children().remove().end(),i(this.element[0]).dialog("widget").find(".ui-dialog-titlebar").clone(!0,!0).appendTo(t),t.css({"float":this.options.minimizeLocation,margin:1}),e.append(t),i(this.element[0]).data("dialog-extend-minimize-controls",t),i(this.element[0]).dialog("option","draggable")&&t.removeClass("ui-draggable"),t.css({height:"auto",width:o,position:"static"}),i(this.element[0]).on("dialogbeforeclose",this._minimize_restoreOnClose).dialog("widget").hide(),this._setState("minimized"),this._trigger("minimize")},_restore_minimized:function(){return i(this.element[0]).dialog("widget").show(),i(this.element[0]).off("dialogbeforeclose",this._minimize_restoreOnClose),i(this.element[0]).data("dialog-extend-minimize-controls").remove(),i(this.element[0]).removeData("dialog-extend-minimize-controls")},_initStyles_minimize:function(){var t;return i(".dialog-extend-minimize-css").length?void 0:(t="",t+='<style class="dialog-extend-minimize-css" type="text/css">',t+=".ui-dialog .ui-dialog-titlebar-minimize { width: 19px; height: 18px; }",t+=".ui-dialog .ui-dialog-titlebar-minimize span { display: block; margin: 1px; }",t+=".ui-dialog .ui-dialog-titlebar-minimize:hover,",t+=".ui-dialog .ui-dialog-titlebar-minimize:focus { padding: 0; }",t+="</style>",i(t).appendTo("body"))},_verifyOptions_minimize:function(){var t;return!this.options.minimizeLocation||"left"!==(t=this.options.minimizeLocation)&&"right"!==t?(i.error("jQuery.dialogExtend Error : Invalid <minimizeLocation> value '"+this.options.minimizeLocation+"'"),this.options.minimizeLocation="left"):void 0},_minimize_restoreOnClose:function(){return i(this).dialogExtend("restore")}})}.call(this);window.initBimViewer = function(context) {var angleMeasurementsData = [
|
|
629
743
|
|
|
@@ -3502,6 +3616,10 @@ function doCompare() {
|
|
|
3502
3616
|
window.model2 = xktLoader.load(settings);
|
|
3503
3617
|
window.model2.on('loaded', () => {
|
|
3504
3618
|
viewer.scene.canvas.spinner.processes++;
|
|
3619
|
+
var vitroModelLoader = new VitroXKTLoaderPlugin(viewer);
|
|
3620
|
+
|
|
3621
|
+
vitroModelLoader.version = BIMCommon.FileCompareVersion;
|
|
3622
|
+
vitroModelLoader.startSmallLoad = true;
|
|
3505
3623
|
doCompareModels(isCompareSideBySide);
|
|
3506
3624
|
});
|
|
3507
3625
|
})
|
|
@@ -3545,6 +3663,77 @@ function convertProperty(data) {
|
|
|
3545
3663
|
}
|
|
3546
3664
|
}
|
|
3547
3665
|
|
|
3666
|
+
return groups;
|
|
3667
|
+
}
|
|
3668
|
+
|
|
3669
|
+
function modelOnLoaded() {
|
|
3670
|
+
|
|
3671
|
+
window.model.fileVersion = fileVersion;
|
|
3672
|
+
window.model.filename = srcModel.substring(srcModel.lastIndexOf('/') + 1).replace('.xkt', '');
|
|
3673
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
3674
|
+
// Create some Annotations
|
|
3675
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
3676
|
+
loadAnnotations();
|
|
3677
|
+
|
|
3678
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
3679
|
+
// Custom Colorize Entity
|
|
3680
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
3681
|
+
viewer.scene.setObjectsColorized(['2O2Fr$t4X7Zf8NOew3FLPP'], [1.0, 0.0, 0.8]); // entityId, color
|
|
3682
|
+
|
|
3683
|
+
//----------------------------------------------------------------------------------------------------------
|
|
3684
|
+
// Angle Measurements
|
|
3685
|
+
//----------------------------------------------------------------------------------------------------------
|
|
3686
|
+
const angleMeasurements = createAngleMeasurements(angleMeasurementsData);
|
|
3687
|
+
|
|
3688
|
+
//----------------------------------------------------------------------------------------------------------
|
|
3689
|
+
// Storey Views
|
|
3690
|
+
//----------------------------------------------------------------------------------------------------------
|
|
3691
|
+
// ????????! ???? ?? initStoreyViews ????? ?????? SectionPlane -> ???????? ?????? ?????? ????? ????????? ? "??????????" ????
|
|
3692
|
+
// ?? ??? ????? ?????? ??????? ????? ??????????? ???????? ??????????? SectionPlane
|
|
3693
|
+
initStoreyViews();
|
|
3694
|
+
|
|
3695
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
3696
|
+
// Load predefined SectionPlanes
|
|
3697
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
3698
|
+
createSectionPlane();
|
|
3699
|
+
|
|
3700
|
+
//----------------------------------------------------------------------------------------------------------
|
|
3701
|
+
// Distance Measurements
|
|
3702
|
+
//----------------------------------------------------------------------------------------------------------
|
|
3703
|
+
const distanceMeasurements = createDistanceMeasurements(distanceMeasurementsData);
|
|
3704
|
+
|
|
3705
|
+
ViewFitAll(viewer);
|
|
3706
|
+
|
|
3707
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
3708
|
+
// Load Small Scene
|
|
3709
|
+
//------------------------------------------------------------------------------------------------------------------
|
|
3710
|
+
|
|
3711
|
+
var vitroModelLoader = new VitroXKTLoaderPlugin(viewer);
|
|
3712
|
+
|
|
3713
|
+
vitroModelLoader.version = BIMCommon.FileVersion;
|
|
3714
|
+
vitroModelLoader.startSmallLoad = true;
|
|
3715
|
+
}
|
|
3716
|
+
|
|
3717
|
+
function convertProperty(data) {
|
|
3718
|
+
let groups = [];
|
|
3719
|
+
|
|
3720
|
+
for (let property of data) {
|
|
3721
|
+
let existingGroups = groups.filter(group => group.name == property.groupName);
|
|
3722
|
+
if (existingGroups.length > 0) {
|
|
3723
|
+
existingGroups[0].properties.push({ name: property.name, value: getPropertyValue(property) });
|
|
3724
|
+
}
|
|
3725
|
+
else {
|
|
3726
|
+
let newGroup = {
|
|
3727
|
+
name: property.groupName,
|
|
3728
|
+
properties: [],
|
|
3729
|
+
};
|
|
3730
|
+
newGroup.properties.push({ name: property.name, value: getPropertyValue(property) });
|
|
3731
|
+
|
|
3732
|
+
|
|
3733
|
+
groups.push(newGroup);
|
|
3734
|
+
}
|
|
3735
|
+
}
|
|
3736
|
+
|
|
3548
3737
|
return groups;
|
|
3549
3738
|
}
|
|
3550
3739
|
//------------------------------------------------------------------------------------------------------------------
|
|
@@ -3603,11 +3792,11 @@ BIMCommon.GetFileItem(context.file.id, versionStr, function (modelId) {
|
|
|
3603
3792
|
fileVersion = '';
|
|
3604
3793
|
fileVersionPath = filePath;
|
|
3605
3794
|
hideXeokitSpinner();
|
|
3606
|
-
doLoadModel();
|
|
3607
|
-
|
|
3608
3795
|
|
|
3609
3796
|
BIMCommon.FileVersion = versionStr;
|
|
3610
3797
|
BIMCommon.FileItemId = context.file.id;
|
|
3798
|
+
|
|
3799
|
+
doLoadModel();
|
|
3611
3800
|
})
|
|
3612
3801
|
|
|
3613
3802
|
}, function () {
|
|
@@ -21208,7 +21208,7 @@ const defaultOptions = {
|
|
|
21208
21208
|
kind: OptionKind.WORKER
|
|
21209
21209
|
},
|
|
21210
21210
|
workerSrc: {
|
|
21211
|
-
value: "resource/pdfViewer/js/pdf.worker.js?version=1.1.
|
|
21211
|
+
value: "resource/pdfViewer/js/pdf.worker.js?version=1.1.122",
|
|
21212
21212
|
kind: OptionKind.WORKER
|
|
21213
21213
|
}
|
|
21214
21214
|
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
interface ActionInfoProps {
|
|
3
|
-
itemList: any[];
|
|
4
|
-
successResult: any[];
|
|
5
|
-
failResult: any[];
|
|
6
|
-
action: number;
|
|
7
|
-
currentItem: any;
|
|
8
|
-
actionCode: string;
|
|
9
|
-
isSuccess: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare const ActionInfo: (props: ActionInfoProps) => JSX.Element;
|
|
12
|
-
export {};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
interface ActionInfoItemProps {
|
|
3
|
-
id: string;
|
|
4
|
-
name: string;
|
|
5
|
-
info: {
|
|
6
|
-
success?: boolean;
|
|
7
|
-
error?: boolean;
|
|
8
|
-
progress?: boolean;
|
|
9
|
-
text: string;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
export declare const ActionInfoItem: (props: ActionInfoItemProps) => JSX.Element;
|
|
13
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import '../../../css/std/controls/icon/icon.css';
|
|
3
|
-
interface IconProps {
|
|
4
|
-
defaultUrl: string;
|
|
5
|
-
hoverUrl?: string;
|
|
6
|
-
className?: string;
|
|
7
|
-
isHover?: boolean;
|
|
8
|
-
onClick?: () => any;
|
|
9
|
-
}
|
|
10
|
-
export declare const Icon: (props: IconProps) => JSX.Element;
|
|
11
|
-
export {};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { SearchCriterion } from '../Search/SearchCriterion';
|
|
3
|
-
interface InputProps {
|
|
4
|
-
valueList: SearchCriterion[];
|
|
5
|
-
textValue?: string;
|
|
6
|
-
placeholder?: string;
|
|
7
|
-
onSettingsClick?: () => any;
|
|
8
|
-
onCancel: () => any;
|
|
9
|
-
onSubmit: (value?: string, searchCriterionList?: SearchCriterion[]) => any;
|
|
10
|
-
onChange?: (value: any) => any;
|
|
11
|
-
onBlur?: () => any;
|
|
12
|
-
onFocus?: () => any;
|
|
13
|
-
onRemoveValue?: (newItemList: SearchCriterion[]) => any;
|
|
14
|
-
isShowSettings?: boolean;
|
|
15
|
-
isSettingsActive?: boolean;
|
|
16
|
-
isActive: boolean;
|
|
17
|
-
isMobileView: boolean;
|
|
18
|
-
className?: string;
|
|
19
|
-
}
|
|
20
|
-
export declare const Input: (props: InputProps) => JSX.Element;
|
|
21
|
-
export {};
|