@vitrosoftware/common-ui-ts 1.1.211 → 1.1.213
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/css/std/controls/alert/alert.css +3 -2
- package/css/std/controls/dropdown-button/dropdown-button.css +4 -0
- package/css/std/controls/dxf-viewer/dxf-viewer-index.css +2 -1
- package/css/std/controls/dxf-viewer/dxf-viewer.css +1 -1
- package/css/std/controls/dxf-viewer/panel.css +1 -0
- package/css/std/controls/lookup-picker/lookup-picker-value-list.css +1 -1
- package/css/std/controls/search/search-dialog.css +0 -16
- package/css/std/controls/table-view/table-view-custom-lookup-edit.css +1 -1
- package/css/std/controls/table-view/treegrid-cell.css +12 -0
- package/dist/index.css +14 -25
- package/dist/index.js +85 -62
- package/dist/index.js.map +1 -1
- package/dist/src/controls/BimViewer/services/BimViewerService.d.ts +2 -0
- package/dist/src/controls/DropdownButton/DropdownButtonItem.d.ts +1 -0
- package/dist/src/controls/DxfViewer/services/DxfViewerService.d.ts +2 -0
- package/dist/src/controls/Header/Header.d.ts +1 -2
- package/dist/src/controls/Header/HeaderNavBar.d.ts +1 -0
- package/dist/src/controls/PdfViewer/services/PdfViewerService.d.ts +2 -0
- package/dist/src/controls/Splitter/Splitter.d.ts +2 -0
- package/dist/src/controls/TableView/services/TableViewService.d.ts +1 -0
- package/dist/src/controls/TableView/services/impl/TableViewServiceImpl.d.ts +1 -0
- package/package.json +1 -1
- package/src/controls/BimViewer/js/bim-viewer.js +154 -15
- package/src/controls/DxfViewer/js/dxf-viewer.js +99 -16
- package/src/controls/PdfViewer/js/pdf-viewer.js +112 -17
|
@@ -3,9 +3,8 @@ import * as SIDEBAR from '../Sidebar/SidebarConstants';
|
|
|
3
3
|
export declare let onChangeSidebarMode: () => void;
|
|
4
4
|
interface HeaderProps {
|
|
5
5
|
cfgSidebar?: any;
|
|
6
|
-
sidebar: SIDEBAR.MODE;
|
|
7
|
-
setSidebar: (mode: SIDEBAR.MODE) => any;
|
|
8
6
|
children: React.ReactNode;
|
|
7
|
+
onChangeSidebar: (sidebar: SIDEBAR.MODE) => any;
|
|
9
8
|
}
|
|
10
9
|
export declare const Header: (props: HeaderProps) => JSX.Element;
|
|
11
10
|
export {};
|
|
@@ -15,6 +15,8 @@ interface SplitterProps {
|
|
|
15
15
|
onWrapperResized?: (splitter: any) => void;
|
|
16
16
|
className?: string;
|
|
17
17
|
children: React.ReactNode;
|
|
18
|
+
localStorageKey?: string;
|
|
19
|
+
isWidthPx?: boolean;
|
|
18
20
|
}
|
|
19
21
|
export declare const Splitter: (props: SplitterProps) => JSX.Element;
|
|
20
22
|
export {};
|
|
@@ -31,6 +31,7 @@ export interface TableViewService {
|
|
|
31
31
|
source: any;
|
|
32
32
|
refreshMode?: string;
|
|
33
33
|
viewId: string;
|
|
34
|
+
visibleColumnList?: string[];
|
|
34
35
|
setSearchCriterionList(searchCriterionList: models.Criterion[], searchId: string): void;
|
|
35
36
|
clearSearchCriterionList(searchId: string): void;
|
|
36
37
|
getSearchCriterionList(searchId?: string): models.Criterion[];
|
|
@@ -14,6 +14,7 @@ export declare class TableViewServiceImpl implements services.TableViewService {
|
|
|
14
14
|
isSendEventOnSelect?: boolean;
|
|
15
15
|
filterRow: models.TableViewRow;
|
|
16
16
|
viewId: string;
|
|
17
|
+
visibleColumnList: string[];
|
|
17
18
|
constructor(grid: any);
|
|
18
19
|
get columnList(): any;
|
|
19
20
|
get columnNameList(): any;
|
package/package.json
CHANGED
|
@@ -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.213';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
Viewer, XKTLoaderPlugin, NavCubePlugin, SectionPlanesPlugin, math, BCFViewpointsPlugin, AnnotationsPlugin,
|
|
5
5
|
ContextMenu, TreeViewPlugin, StoreyViewsPlugin, AngleMeasurementsPlugin, CameraMemento, DistanceMeasurementsPlugin,
|
|
6
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.213';
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -967,7 +967,7 @@ function setPropertyBDSets(id) {
|
|
|
967
967
|
collapsible: true,
|
|
968
968
|
heightStyle: "content"
|
|
969
969
|
});
|
|
970
|
-
|
|
970
|
+
showPropInspector();
|
|
971
971
|
}
|
|
972
972
|
|
|
973
973
|
function addPropertySet(propertySets, html) {
|
|
@@ -1003,7 +1003,7 @@ function addPropertySet(propertySets, html) {
|
|
|
1003
1003
|
collapsible: true,
|
|
1004
1004
|
heightStyle: "content"
|
|
1005
1005
|
});
|
|
1006
|
-
|
|
1006
|
+
showPropInspector();
|
|
1007
1007
|
}
|
|
1008
1008
|
|
|
1009
1009
|
function setPropertySets(metaObject, dictionaryName = []) {
|
|
@@ -1029,12 +1029,12 @@ function setPropertySets(metaObject, dictionaryName = []) {
|
|
|
1029
1029
|
collapsible: true,
|
|
1030
1030
|
heightStyle: "content"
|
|
1031
1031
|
});
|
|
1032
|
-
|
|
1032
|
+
showPropInspector();
|
|
1033
1033
|
}
|
|
1034
1034
|
|
|
1035
1035
|
function bindPropInspectorClose() {
|
|
1036
1036
|
$('.prop-inspector-close').on('click', function () {
|
|
1037
|
-
|
|
1037
|
+
hidePropInspector();
|
|
1038
1038
|
})
|
|
1039
1039
|
}
|
|
1040
1040
|
|
|
@@ -3091,6 +3091,8 @@ const fastNavPlugin = new FastNavPlugin(viewer, {
|
|
|
3091
3091
|
const EVENT_SEARCH_ISSUE_LIST = 'vitro.search.issue.list';
|
|
3092
3092
|
const EVENT_ISSUE_LIST_REFRESH = 'vitro.issue.list.refresh';
|
|
3093
3093
|
const EVENT_ISSUE_LIST_SELECT_ITEM = 'vitro.issue.list.select.item';
|
|
3094
|
+
const PANE_LEFT_MIN_WIDTH = 150;
|
|
3095
|
+
const PANE_RIGHT_MIN_WIDTH = 200;
|
|
3094
3096
|
|
|
3095
3097
|
var notesDescriptionVisibleList = {};
|
|
3096
3098
|
|
|
@@ -3391,6 +3393,8 @@ function createSidebarNotesItemHeader(noteData) {
|
|
|
3391
3393
|
|
|
3392
3394
|
function hidePropInspector() {
|
|
3393
3395
|
$('#propInspector').hide();
|
|
3396
|
+
setPositionNavCubeCanvas(0);
|
|
3397
|
+
setPositionSectionPlanesOverviewCanvas(0);
|
|
3394
3398
|
}
|
|
3395
3399
|
|
|
3396
3400
|
//------------------------------------------------------------------------------------------------------------------
|
|
@@ -3844,14 +3848,7 @@ function showNotesDescription() {
|
|
|
3844
3848
|
}
|
|
3845
3849
|
|
|
3846
3850
|
function initIssueDetailResizable() {
|
|
3847
|
-
$('#issueDetail')
|
|
3848
|
-
handles: "w",
|
|
3849
|
-
minWidth: 200,
|
|
3850
|
-
resize: function (event, ui) {
|
|
3851
|
-
$('#navCubeCanvas').css('right', $('#issueDetail').width() + 10);
|
|
3852
|
-
$('#sectionPlanesOverviewCanvas').css('right', $('#issueDetail').width() + 10);
|
|
3853
|
-
}
|
|
3854
|
-
});
|
|
3851
|
+
initResizable($('#issueDetail'), 'w', PANE_RIGHT_MIN_WIDTH, onIssueDetailResizeHandler, onIssueDetailResizeEndHandler);
|
|
3855
3852
|
}
|
|
3856
3853
|
|
|
3857
3854
|
function addToTreeView(model, sceneModelId) {
|
|
@@ -3942,7 +3939,147 @@ function selectIssueListItem(itemId) {
|
|
|
3942
3939
|
const event = new CustomEvent(EVENT_ISSUE_LIST_SELECT_ITEM, { detail: { itemId: itemId } });
|
|
3943
3940
|
window.dispatchEvent(event);
|
|
3944
3941
|
}
|
|
3945
|
-
|
|
3942
|
+
|
|
3943
|
+
function setSettings(settings) {
|
|
3944
|
+
const settingsString = settings ? JSON.stringify(settings) : '';
|
|
3945
|
+
context.setSettingsToLocalStorage(settingsString);
|
|
3946
|
+
}
|
|
3947
|
+
|
|
3948
|
+
function getSettings() {
|
|
3949
|
+
const settings = context.getSettingsFromLocalStorage();
|
|
3950
|
+
return settings ? JSON.parse(settings) : {};
|
|
3951
|
+
}
|
|
3952
|
+
|
|
3953
|
+
function setPaneRightSettings(width) {
|
|
3954
|
+
const settings = getSettings();
|
|
3955
|
+
settings.rightPaneWidth = width;
|
|
3956
|
+
setSettings(settings);
|
|
3957
|
+
}
|
|
3958
|
+
|
|
3959
|
+
function setPaneLeftSettings(width) {
|
|
3960
|
+
const settings = getSettings();
|
|
3961
|
+
settings.leftPaneWidth = width;
|
|
3962
|
+
setSettings(settings);
|
|
3963
|
+
}
|
|
3964
|
+
|
|
3965
|
+
function initPaneWidth() {
|
|
3966
|
+
const settings = getSettings();
|
|
3967
|
+
setWidthPaneRight(settings.rightPaneWidth);
|
|
3968
|
+
setWidthPaneLeft(settings.leftPaneWidth);
|
|
3969
|
+
}
|
|
3970
|
+
|
|
3971
|
+
function setWidthPaneRight(width) {
|
|
3972
|
+
if (width) {
|
|
3973
|
+
$('#sidebarWrap').width(width);
|
|
3974
|
+
$('#issueDetail').width(width);
|
|
3975
|
+
$('#propInspector').width(width);
|
|
3976
|
+
}
|
|
3977
|
+
}
|
|
3978
|
+
|
|
3979
|
+
function setWidthPaneLeft(width) {
|
|
3980
|
+
if (width) {
|
|
3981
|
+
$('#treeViewContainerWrap').width(width);
|
|
3982
|
+
$('#storeyViewsSidebar').width(width);
|
|
3983
|
+
}
|
|
3984
|
+
}
|
|
3985
|
+
|
|
3986
|
+
function setPositionSectionPlanesOverviewCanvas(width) {
|
|
3987
|
+
$('#sectionPlanesOverviewCanvas').css('right', width + 10);
|
|
3988
|
+
}
|
|
3989
|
+
|
|
3990
|
+
function setPositionNavCubeCanvas(width) {
|
|
3991
|
+
$('#navCubeCanvas').css('right', width + 10);
|
|
3992
|
+
}
|
|
3993
|
+
|
|
3994
|
+
function initResizable(element, handles, minWidth, resizeHadler, onResizeEndHadler) {
|
|
3995
|
+
element.resizable({
|
|
3996
|
+
handles: handles,
|
|
3997
|
+
minWidth: minWidth,
|
|
3998
|
+
resize: function (event, ui) {
|
|
3999
|
+
if (typeof resizeHadler === 'function') {
|
|
4000
|
+
resizeHadler(element.width());
|
|
4001
|
+
}
|
|
4002
|
+
},
|
|
4003
|
+
stop: function (event, ui) {
|
|
4004
|
+
if (typeof onResizeEndHadler === 'function') {
|
|
4005
|
+
onResizeEndHadler(event, ui);
|
|
4006
|
+
}
|
|
4007
|
+
}
|
|
4008
|
+
});
|
|
4009
|
+
}
|
|
4010
|
+
|
|
4011
|
+
function onIssueDetailResizeHandler(width) {
|
|
4012
|
+
onPaneRightResizeHandler(width);
|
|
4013
|
+
};
|
|
4014
|
+
|
|
4015
|
+
function onPaneRightResizeHandler(width) {
|
|
4016
|
+
setPositionNavCubeCanvas(width);
|
|
4017
|
+
setPositionSectionPlanesOverviewCanvas(width);
|
|
4018
|
+
}
|
|
4019
|
+
|
|
4020
|
+
function onIssueDetailResizeEndHandler(event, ui) {
|
|
4021
|
+
$('#propInspector').width(ui.size.width).css('left', getPaneRightPosition(ui.size.width) + 'px');
|
|
4022
|
+
$('#sidebarWrap').width(ui.size.width).css('left', getPaneRightPosition(ui.size.width) + 'px');
|
|
4023
|
+
setPaneRightSettings(ui.size.width);
|
|
4024
|
+
}
|
|
4025
|
+
|
|
4026
|
+
function initTreeViewPanelResizable() {
|
|
4027
|
+
initResizable($('#treeViewContainerWrap'), 'e', PANE_LEFT_MIN_WIDTH, false, onTreeViewResizeEndHandler);
|
|
4028
|
+
}
|
|
4029
|
+
|
|
4030
|
+
function onTreeViewResizeEndHandler(event, ui) {
|
|
4031
|
+
const width = ui.size.width - $('#treeViewContainerWrap > .ui-resizable-handle').width();
|
|
4032
|
+
$('#storeyViewsSidebar').width(width);
|
|
4033
|
+
setPaneLeftSettings(width);
|
|
4034
|
+
}
|
|
4035
|
+
|
|
4036
|
+
function initStoreyViewResizable() {
|
|
4037
|
+
initResizable($('#storeyViewsSidebar'), 'e', PANE_LEFT_MIN_WIDTH, false, onStoreyViewResizeEndHandler);
|
|
4038
|
+
}
|
|
4039
|
+
|
|
4040
|
+
function onStoreyViewResizeEndHandler(event, ui) {
|
|
4041
|
+
$('#treeViewContainerWrap').width(ui.size.width);
|
|
4042
|
+
setPaneLeftSettings(ui.size.width);
|
|
4043
|
+
}
|
|
4044
|
+
|
|
4045
|
+
function initPropertySetsResizable() {
|
|
4046
|
+
initResizable($('#propInspector'), 'w', PANE_RIGHT_MIN_WIDTH, onPropsInspectorResizeHandler, onPropsInspectorResizeEndHandler);
|
|
4047
|
+
}
|
|
4048
|
+
|
|
4049
|
+
function onPropsInspectorResizeHandler(width) {
|
|
4050
|
+
onPaneRightResizeHandler(width);
|
|
4051
|
+
};
|
|
4052
|
+
|
|
4053
|
+
function onPropsInspectorResizeEndHandler(event, ui) {
|
|
4054
|
+
$('#issueDetail').width(ui.size.width).css('left', getPaneRightPosition(ui.size.width) + 'px');
|
|
4055
|
+
$('#sidebarWrap').width(ui.size.width).css('left', getPaneRightPosition(ui.size.width) + 'px');
|
|
4056
|
+
setPaneRightSettings(ui.size.width);
|
|
4057
|
+
}
|
|
4058
|
+
|
|
4059
|
+
function initSidebarResizable() {
|
|
4060
|
+
initResizable($('#sidebarWrap'), 'w', PANE_RIGHT_MIN_WIDTH, onIssueListResizeHandler, onIssueListResizeEndHandler);
|
|
4061
|
+
}
|
|
4062
|
+
|
|
4063
|
+
function onIssueListResizeHandler(width) {
|
|
4064
|
+
onPaneRightResizeHandler(width);
|
|
4065
|
+
}
|
|
4066
|
+
|
|
4067
|
+
function onIssueListResizeEndHandler(event, ui) {
|
|
4068
|
+
$('#issueDetail').width(ui.size.width).css('left', getPaneRightPosition(ui.size.width) + 'px');
|
|
4069
|
+
$('#propInspector').width(ui.size.width).css('left', getPaneRightPosition(ui.size.width) + 'px');
|
|
4070
|
+
setPaneRightSettings(ui.size.width);
|
|
4071
|
+
}
|
|
4072
|
+
|
|
4073
|
+
function getPaneRightPosition(width) {
|
|
4074
|
+
return ($('body').width() - width);
|
|
4075
|
+
}
|
|
4076
|
+
|
|
4077
|
+
function showPropInspector() {
|
|
4078
|
+
$('#propInspector').show();
|
|
4079
|
+
const width = $('#propInspector').width();
|
|
4080
|
+
setPositionNavCubeCanvas(width);
|
|
4081
|
+
setPositionSectionPlanesOverviewCanvas(width);
|
|
4082
|
+
}
|
|
3946
4083
|
//------------------------------------------------------------------------------------------------------------------
|
|
3947
4084
|
// Do action wherever we click on an object
|
|
3948
4085
|
//------------------------------------------------------------------------------------------------------------------
|
|
@@ -4031,6 +4168,8 @@ function init() {
|
|
|
4031
4168
|
initTreeViewPanelResizable();
|
|
4032
4169
|
initSidebarResizable();
|
|
4033
4170
|
initIssueDetailResizable();
|
|
4171
|
+
initStoreyViewResizable();
|
|
4172
|
+
initPaneWidth();
|
|
4034
4173
|
|
|
4035
4174
|
bindBtnToggleSidebarStoreyViews();
|
|
4036
4175
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import * as three from '/resource/dxfViewer/js/three/three.module.js?version=1.1.
|
|
2
|
-
import { Matrix3, Vector2 } from '/resource/dxfViewer/js/three/three.module.js?version=1.1.
|
|
3
|
-
import { Batch, DxfViewer, Layer } from '/resource/dxfViewer/js/viewer/DxfViewer.js?version=1.1.
|
|
4
|
-
import { Block as SceneBlock } from '/resource/dxfViewer/js/viewer/DxfScene.js?version=1.1.
|
|
5
|
-
import { Block } from '/resource/dxfViewer/js/viewer/DxfViewer.js?version=1.1.
|
|
6
|
-
import { DxfScene, Entity, ColorCode } from '/resource/dxfViewer/js/viewer/DxfScene.js?version=1.1.
|
|
7
|
-
import { TextRenderer, ParseSpecialChars, HAlign, VAlign } from '/resource/dxfViewer/js/viewer/TextRenderer.js?version=1.1.
|
|
8
|
-
import { DxfWorker } from '/resource/dxfViewer/js/viewer/DxfWorker.js?version=1.1.
|
|
9
|
-
import { DxfFetcher } from '/resource/dxfViewer/js/viewer/DxfFetcher.js?version=1.1.
|
|
10
|
-
import DxfParser from '/resource/dxfViewer/js/viewer/parser/DxfParser.js?version=1.1.
|
|
11
|
-
import { RenderBatch } from '/resource/dxfViewer/js/viewer/DxfScene.js?version=1.1.
|
|
12
|
-
import { DynamicBuffer, NativeType } from '/resource/dxfViewer/js/viewer/DynamicBuffer.js?version=1.1.
|
|
13
|
-
import { OrbitControls } from '/resource/dxfViewer/js/viewer/OrbitControls.js?version=1.1.
|
|
14
|
-
import { CSS2DRenderer, CSS2DObject } from '/resource/dxfViewer/js/three/three.module.js?version=1.1.
|
|
1
|
+
import * as three from '/resource/dxfViewer/js/three/three.module.js?version=1.1.213';
|
|
2
|
+
import { Matrix3, Vector2 } from '/resource/dxfViewer/js/three/three.module.js?version=1.1.213';
|
|
3
|
+
import { Batch, DxfViewer, Layer } from '/resource/dxfViewer/js/viewer/DxfViewer.js?version=1.1.213';
|
|
4
|
+
import { Block as SceneBlock } from '/resource/dxfViewer/js/viewer/DxfScene.js?version=1.1.213';
|
|
5
|
+
import { Block } from '/resource/dxfViewer/js/viewer/DxfViewer.js?version=1.1.213';
|
|
6
|
+
import { DxfScene, Entity, ColorCode } from '/resource/dxfViewer/js/viewer/DxfScene.js?version=1.1.213';
|
|
7
|
+
import { TextRenderer, ParseSpecialChars, HAlign, VAlign } from '/resource/dxfViewer/js/viewer/TextRenderer.js?version=1.1.213';
|
|
8
|
+
import { DxfWorker } from '/resource/dxfViewer/js/viewer/DxfWorker.js?version=1.1.213';
|
|
9
|
+
import { DxfFetcher } from '/resource/dxfViewer/js/viewer/DxfFetcher.js?version=1.1.213';
|
|
10
|
+
import DxfParser from '/resource/dxfViewer/js/viewer/parser/DxfParser.js?version=1.1.213';
|
|
11
|
+
import { RenderBatch } from '/resource/dxfViewer/js/viewer/DxfScene.js?version=1.1.213';
|
|
12
|
+
import { DynamicBuffer, NativeType } from '/resource/dxfViewer/js/viewer/DynamicBuffer.js?version=1.1.213';
|
|
13
|
+
import { OrbitControls } from '/resource/dxfViewer/js/viewer/OrbitControls.js?version=1.1.213';
|
|
14
|
+
import { CSS2DRenderer, CSS2DObject } from '/resource/dxfViewer/js/three/three.module.js?version=1.1.213';
|
|
15
15
|
|
|
16
16
|
let treeViewData = [];
|
|
17
17
|
let notes = [];
|
|
@@ -3623,6 +3623,7 @@ function bindResizerMouseup() {
|
|
|
3623
3623
|
$(document).on('mouseup', function (e) {
|
|
3624
3624
|
e.preventDefault();
|
|
3625
3625
|
e.stopPropagation();
|
|
3626
|
+
onResizeEndPaneHandler($('.vitro-draggable').parent());
|
|
3626
3627
|
$('.vitro-resizer').removeClass('vitro-draggable');
|
|
3627
3628
|
});
|
|
3628
3629
|
}
|
|
@@ -3633,15 +3634,20 @@ function bindResizerMousemove() {
|
|
|
3633
3634
|
e.preventDefault();
|
|
3634
3635
|
e.stopPropagation();
|
|
3635
3636
|
if ($('.vitro-draggable').hasClass('vitro-left')) {
|
|
3636
|
-
$('.vitro-draggable').parent().width($(document).width() - e.clientX);
|
|
3637
|
+
$('.vitro-draggable').parent().width(getPaneWidth($(document).width() - e.clientX));
|
|
3637
3638
|
} else {
|
|
3638
|
-
$('.vitro-draggable').parent().width(e.clientX);
|
|
3639
|
+
$('.vitro-draggable').parent().width(getPaneWidth(e.clientX));
|
|
3639
3640
|
}
|
|
3640
3641
|
updateCanvasContainerWidth();
|
|
3641
3642
|
}
|
|
3642
3643
|
});
|
|
3643
3644
|
}
|
|
3644
3645
|
|
|
3646
|
+
function getPaneWidth(width) {
|
|
3647
|
+
const maxWidth = Math.floor(($('body').width() * 40) / 100);
|
|
3648
|
+
return width > maxWidth ? maxWidth : width;
|
|
3649
|
+
}
|
|
3650
|
+
|
|
3645
3651
|
function updateCanvasContainerWidth() {
|
|
3646
3652
|
let insetStart = 0;
|
|
3647
3653
|
let insetEnd = 0;
|
|
@@ -3692,6 +3698,82 @@ function reinitMarkupList() {
|
|
|
3692
3698
|
}
|
|
3693
3699
|
});
|
|
3694
3700
|
}
|
|
3701
|
+
}
|
|
3702
|
+
|
|
3703
|
+
function initPaneWidth() {
|
|
3704
|
+
const settings = getSettings();
|
|
3705
|
+
setWidthPaneRight(settings.rightPaneWidth);
|
|
3706
|
+
setWidthPaneLeft(settings.leftPaneWidth);
|
|
3707
|
+
}
|
|
3708
|
+
|
|
3709
|
+
function setSettings(settings) {
|
|
3710
|
+
const settingsString = settings ? JSON.stringify(settings) : '';
|
|
3711
|
+
context.setSettingsToLocalStorage(settingsString);
|
|
3712
|
+
}
|
|
3713
|
+
|
|
3714
|
+
function getSettings() {
|
|
3715
|
+
const settings = context.getSettingsFromLocalStorage();
|
|
3716
|
+
return settings ? JSON.parse(settings) : {};
|
|
3717
|
+
}
|
|
3718
|
+
|
|
3719
|
+
function setWidthPaneRight(width) {
|
|
3720
|
+
if (width) {
|
|
3721
|
+
$('.sidebar').width(width);
|
|
3722
|
+
$('.vitro-issue-detail').width(width);
|
|
3723
|
+
updateCanvasContainerWidth();
|
|
3724
|
+
}
|
|
3725
|
+
}
|
|
3726
|
+
|
|
3727
|
+
function setWidthPaneLeft(width) {
|
|
3728
|
+
if (width) {
|
|
3729
|
+
$('#sidebarContainer').width(width);
|
|
3730
|
+
$('#layersContainer').width(width);
|
|
3731
|
+
updateCanvasContainerWidth();
|
|
3732
|
+
}
|
|
3733
|
+
}
|
|
3734
|
+
|
|
3735
|
+
function onResizeEndPaneHandler(elm) {
|
|
3736
|
+
const settings = getSettings();
|
|
3737
|
+
if (isTargetPaneLeft(elm)) {
|
|
3738
|
+
onResizeEndPaneLeftHandler(elm, settings);
|
|
3739
|
+
}
|
|
3740
|
+
if (isTargetPaneRight(elm)) {
|
|
3741
|
+
onResizeEndPaneRightHandler(elm, settings);
|
|
3742
|
+
}
|
|
3743
|
+
}
|
|
3744
|
+
|
|
3745
|
+
function onResizeEndPaneLeftHandler(elm, settings) {
|
|
3746
|
+
const width = elm.width();
|
|
3747
|
+
settings.leftPaneWidth = width;
|
|
3748
|
+
setSettings(settings);
|
|
3749
|
+
if (elm.attr('id') === 'sidebarContainer') {
|
|
3750
|
+
$('#layersContainer').width(width);
|
|
3751
|
+
}
|
|
3752
|
+
if (elm.attr('id') === 'layersContainer') {
|
|
3753
|
+
$('#sidebarContainer').width(width);
|
|
3754
|
+
}
|
|
3755
|
+
}
|
|
3756
|
+
|
|
3757
|
+
function onResizeEndPaneRightHandler(elm, settings) {
|
|
3758
|
+
let width;
|
|
3759
|
+
if (elm.hasClass('sidebar')) {
|
|
3760
|
+
width = $('.sidebar').width();
|
|
3761
|
+
$('.vitro-issue-detail').width(width);
|
|
3762
|
+
}
|
|
3763
|
+
if (elm.hasClass('vitro-issue-detail')) {
|
|
3764
|
+
width = $('.vitro-issue-detail').width();
|
|
3765
|
+
$('.sidebar').width(width);
|
|
3766
|
+
}
|
|
3767
|
+
settings.rightPaneWidth = width;
|
|
3768
|
+
setSettings(settings);
|
|
3769
|
+
}
|
|
3770
|
+
|
|
3771
|
+
function isTargetPaneLeft(elm) {
|
|
3772
|
+
return elm && $(elm).length && (elm.attr('id') === 'sidebarContainer' || elm.attr('id') === 'layersContainer');
|
|
3773
|
+
}
|
|
3774
|
+
|
|
3775
|
+
function isTargetPaneRight(elm) {
|
|
3776
|
+
return elm && elm.length && (elm.hasClass('sidebar') || elm.hasClass('vitro-issue-detail'));
|
|
3695
3777
|
}
|
|
3696
3778
|
$(document).ready(function () {
|
|
3697
3779
|
bindBtnToggleSidebarNotes();
|
|
@@ -3717,6 +3799,7 @@ $(document).ready(function () {
|
|
|
3717
3799
|
bindScaleSelectChange();
|
|
3718
3800
|
bindPanelResize();
|
|
3719
3801
|
bindUpdateDocumentMarkupList();
|
|
3802
|
+
initPaneWidth();
|
|
3720
3803
|
});
|
|
3721
3804
|
|
|
3722
3805
|
var userLocale =
|
|
@@ -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.213",
|
|
21212
21212
|
kind: OptionKind.WORKER
|
|
21213
21213
|
}
|
|
21214
21214
|
};
|
|
@@ -25740,6 +25740,12 @@ class PDFSidebar {
|
|
|
25740
25740
|
window.removeEventListener("mousemove", this.#mouseMoveBound);
|
|
25741
25741
|
window.removeEventListener("mouseup", this.#mouseUpBound);
|
|
25742
25742
|
}
|
|
25743
|
+
updateWidth(width = 0) {
|
|
25744
|
+
this.#updateWidth(width);
|
|
25745
|
+
}
|
|
25746
|
+
getWidth(){
|
|
25747
|
+
return this.#width;
|
|
25748
|
+
}
|
|
25743
25749
|
}
|
|
25744
25750
|
exports.PDFSidebar = PDFSidebar;
|
|
25745
25751
|
|
|
@@ -37408,6 +37414,7 @@ var label_measures2PointHint = context.createLocale('app.viewer.pdf.measures.two
|
|
|
37408
37414
|
const EVENT_SEARCH_ISSUE_LIST = 'vitro.search.issue.list';
|
|
37409
37415
|
const EVENT_ISSUE_LIST_REFRESH = 'vitro.issue.list.refresh';
|
|
37410
37416
|
const EVENT_ISSUE_LIST_SELECT_ITEM = 'vitro.issue.list.select.item';
|
|
37417
|
+
const EVENT_ITEM_CHANGED = 'vitro.item.changed';
|
|
37411
37418
|
|
|
37412
37419
|
function initContextMenuCanvas() {
|
|
37413
37420
|
var pages = '#viewer .page:not(.has-new-svg)';
|
|
@@ -37672,6 +37679,7 @@ function createComparePanel(compareObjList) {
|
|
|
37672
37679
|
btnComparePanelClose.on('click', function () {
|
|
37673
37680
|
$('#comparePanel').hide();
|
|
37674
37681
|
$('#comparePanelVisibility').toggleClass('active');
|
|
37682
|
+
$('#btnComparePanel').removeClass('active');
|
|
37675
37683
|
});
|
|
37676
37684
|
header.append(btnComparePanelClose);
|
|
37677
37685
|
var body = $('<div class="compare-panel_body" />');
|
|
@@ -38530,6 +38538,7 @@ function setDlgMeasureSettingsPrecision(precision) {
|
|
|
38530
38538
|
function initSidebarResizable() {
|
|
38531
38539
|
initResizable($('.body__sidebar'));
|
|
38532
38540
|
initResizable($('.vitro-issue-detail'));
|
|
38541
|
+
initResizeEndPaneLeftHandler();
|
|
38533
38542
|
}
|
|
38534
38543
|
|
|
38535
38544
|
function initResizable(element) {
|
|
@@ -38538,6 +38547,9 @@ function initResizable(element) {
|
|
|
38538
38547
|
minWidth: 200,
|
|
38539
38548
|
resize: function (event, ui) {
|
|
38540
38549
|
setContainerInset(element.width());
|
|
38550
|
+
},
|
|
38551
|
+
stop: function (event, ui) {
|
|
38552
|
+
onResizeEndPaneRightHandler(event, ui);
|
|
38541
38553
|
}
|
|
38542
38554
|
});
|
|
38543
38555
|
}
|
|
@@ -38561,22 +38573,6 @@ function removeSvg(svgData) {
|
|
|
38561
38573
|
|
|
38562
38574
|
function initNotes() {
|
|
38563
38575
|
const searchCriterion = window.searchCriterionList ? window.searchCriterionList : [];
|
|
38564
|
-
//$(document).on('webViewerPageRendered', function (e, pageNr) {
|
|
38565
|
-
// if (context.issueList) {
|
|
38566
|
-
// initNotesByPageNr(pageNr);
|
|
38567
|
-
// if (isSketchpadActive) {
|
|
38568
|
-
// $('.svgsketch-wrap').addClass('active');
|
|
38569
|
-
// }
|
|
38570
|
-
// } else {
|
|
38571
|
-
// context.getIssueList(searchCriterion).then(list => {
|
|
38572
|
-
// context.issueList = list;
|
|
38573
|
-
// initNotesByPageNr(pageNr);
|
|
38574
|
-
// if (isSketchpadActive) {
|
|
38575
|
-
// $('.svgsketch-wrap').addClass('active');
|
|
38576
|
-
// }
|
|
38577
|
-
// });
|
|
38578
|
-
// }
|
|
38579
|
-
//});
|
|
38580
38576
|
const renderedPageList = [];
|
|
38581
38577
|
|
|
38582
38578
|
context.getIssueList(searchCriterion).then(list => {
|
|
@@ -38599,6 +38595,104 @@ function initMarkupByPageNr(pageNr) {
|
|
|
38599
38595
|
if (isSketchpadActive) {
|
|
38600
38596
|
$('.svgsketch-wrap').addClass('active');
|
|
38601
38597
|
}
|
|
38598
|
+
}
|
|
38599
|
+
|
|
38600
|
+
function initPaneWidth() {
|
|
38601
|
+
const settings = getSettings();
|
|
38602
|
+
if (settings.rightPaneWidth) {
|
|
38603
|
+
setWidthPaneRight(settings.rightPaneWidth);
|
|
38604
|
+
}
|
|
38605
|
+
if (settings.leftPaneWidth) {
|
|
38606
|
+
const interval = setInterval(() => {
|
|
38607
|
+
if (PDFViewerApplication.pdfSidebar) {
|
|
38608
|
+
setWidthPaneLeft(settings.leftPaneWidth);
|
|
38609
|
+
clearInterval(interval);
|
|
38610
|
+
}
|
|
38611
|
+
}, 50);
|
|
38612
|
+
}
|
|
38613
|
+
initItemChangedEventListener();
|
|
38614
|
+
}
|
|
38615
|
+
|
|
38616
|
+
function setWidthPaneLeft(width) {
|
|
38617
|
+
PDFViewerApplication.pdfSidebar?.updateWidth(width);
|
|
38618
|
+
}
|
|
38619
|
+
|
|
38620
|
+
function setWidthPaneRight(width) {
|
|
38621
|
+
setWidthSidebarIssueList(width);
|
|
38622
|
+
setWidthSidebarIssueDetail(width);
|
|
38623
|
+
if (isSidebarIssueListVisible() || isSidebarIssueDetailVisible()) {
|
|
38624
|
+
setContainerInset(width);
|
|
38625
|
+
}
|
|
38626
|
+
}
|
|
38627
|
+
|
|
38628
|
+
function onResizeEndPaneRightHandler(event, ui) {
|
|
38629
|
+
const settings = getSettings();
|
|
38630
|
+
settings.rightPaneWidth = ui.size.width;
|
|
38631
|
+
setSettings(settings);
|
|
38632
|
+
if (ui.element.hasClass('body__sidebar')) {
|
|
38633
|
+
setWidthSidebarIssueDetail(ui.size.width);
|
|
38634
|
+
$('.vitro-issue-detail').css('left', $('#viewerContainer').width() + 'px');
|
|
38635
|
+
}
|
|
38636
|
+
if (ui.element.hasClass('vitro-issue-detail')) {
|
|
38637
|
+
setWidthSidebarIssueList(ui.size.width);
|
|
38638
|
+
$('.body__sidebar').css('left', $('#viewerContainer').width() + 'px');
|
|
38639
|
+
}
|
|
38640
|
+
}
|
|
38641
|
+
|
|
38642
|
+
function isSidebarIssueDetailVisible() {
|
|
38643
|
+
return $('.vitro-issue-detail').is(':visible');
|
|
38644
|
+
}
|
|
38645
|
+
|
|
38646
|
+
function isSidebarIssueListVisible() {
|
|
38647
|
+
return $('.body__sidebar').is(':visible');
|
|
38648
|
+
}
|
|
38649
|
+
|
|
38650
|
+
function setWidthSidebarIssueDetail(width) {
|
|
38651
|
+
$('.vitro-issue-detail').width(width);
|
|
38652
|
+
}
|
|
38653
|
+
|
|
38654
|
+
function setWidthSidebarIssueList(width) {
|
|
38655
|
+
$('.body__sidebar').width(width);
|
|
38656
|
+
}
|
|
38657
|
+
|
|
38658
|
+
function setSettings(settings) {
|
|
38659
|
+
const settingsString = settings ? JSON.stringify(settings) : '';
|
|
38660
|
+
context.setSettingsToLocalStorage(settingsString);
|
|
38661
|
+
}
|
|
38662
|
+
|
|
38663
|
+
function getSettings() {
|
|
38664
|
+
const settings = context.getSettingsFromLocalStorage();
|
|
38665
|
+
return settings ? JSON.parse(settings) : {};
|
|
38666
|
+
}
|
|
38667
|
+
|
|
38668
|
+
function onResizeEndPaneLeftHandler(width) {
|
|
38669
|
+
const settings = getSettings();
|
|
38670
|
+
settings.leftPaneWidth = width;
|
|
38671
|
+
setSettings(settings);
|
|
38672
|
+
}
|
|
38673
|
+
|
|
38674
|
+
function initResizeEndPaneLeftHandler() {
|
|
38675
|
+
PDFViewerApplication.initializedPromise.then(function () {
|
|
38676
|
+
PDFViewerApplication.pdfSidebar.eventBus.on('resize', function (e) {
|
|
38677
|
+
if (e.source == PDFViewerApplication.pdfSidebar) {
|
|
38678
|
+
onResizeEndPaneLeftHandler(PDFViewerApplication.pdfSidebar.getWidth());
|
|
38679
|
+
}
|
|
38680
|
+
});
|
|
38681
|
+
});
|
|
38682
|
+
}
|
|
38683
|
+
|
|
38684
|
+
function initItemChangedEventListener() {
|
|
38685
|
+
window.addEventListener(EVENT_ITEM_CHANGED, onItemChanged);
|
|
38686
|
+
}
|
|
38687
|
+
|
|
38688
|
+
function onItemChanged() {
|
|
38689
|
+
const width = $('.vitro-issue-detail').width();
|
|
38690
|
+
if (width) {
|
|
38691
|
+
setContainerInset(width);
|
|
38692
|
+
}
|
|
38693
|
+
if (!$('.vitro-issue-detail').resizable('instance')) {
|
|
38694
|
+
initResizable($('.vitro-issue-detail'));
|
|
38695
|
+
}
|
|
38602
38696
|
}
|
|
38603
38697
|
$(document).ready(function() {
|
|
38604
38698
|
context.openFile();
|
|
@@ -38628,4 +38722,5 @@ $(document).ready(function() {
|
|
|
38628
38722
|
initCompare();
|
|
38629
38723
|
|
|
38630
38724
|
initSidebarResizable();
|
|
38725
|
+
initPaneWidth();
|
|
38631
38726
|
});}
|