@vitrosoftware/common-ui-ts 1.1.226 → 1.1.227
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 +47 -10
- package/css/std/controls/bim-viewer/bim-viewer-index.css +0 -4
- package/css/std/controls/bim-viewer/style.css +0 -4
- package/css/std/controls/dialog/dialog-content.css +0 -3
- package/css/std/controls/dialog/dialog-footer.css +0 -2
- package/css/std/controls/dxf-viewer/common.css +0 -4
- package/css/std/controls/dxf-viewer/dxf-viewer-index.css +0 -4
- package/css/std/controls/field-iterator/field-iterator.css +0 -6
- package/css/std/controls/file/file.css +4 -5
- package/css/std/controls/file/img/file-button-context.svg +6 -0
- package/css/std/controls/filter/filter.css +1 -1
- package/css/std/controls/lookup-picker/lookup-picker.css +19 -41
- package/css/std/controls/pdf-viewer/custom.css +0 -4
- package/css/std/controls/pdf-viewer/pdf-viewer-index.css +0 -69
- package/css/std/controls/pdf-viewer/pdf-viewer.css +0 -65
- package/css/std/controls/select/select.css +1 -25
- package/css/std/controls/tab-group/tab-group.css +3 -6
- package/css/std/controls/table-view/treegrid-cell.css +0 -1
- package/css/std/controls/table-view/treegrid-context-menu.css +0 -19
- package/css/std/controls/video-viewer/video-viewer.css +1 -1
- package/dist/index.css +77 -100
- package/dist/index.js +1161 -1507
- package/dist/index.js.map +1 -1
- package/dist/src/constants/Factory.d.ts +0 -1
- package/dist/src/controls/Alert/Alert.d.ts +4 -0
- package/dist/src/controls/Dialog/Dialog.d.ts +0 -2
- package/dist/src/controls/Dialog/DialogContent.d.ts +0 -1
- package/dist/src/controls/LookupPicker/RightButtonGroup.d.ts +2 -2
- package/dist/src/controls/PdfViewer/services/PdfViewerService.d.ts +0 -2
- package/dist/src/controls/ScrollBar/ScrollBar.d.ts +2 -3
- package/dist/src/controls/Search/Search.d.ts +2 -3
- package/dist/src/controls/TabGroup/Tab.d.ts +3 -3
- package/dist/src/controls/TabGroup/TabGroup.d.ts +1 -0
- package/dist/src/controls/TabGroup/TabGroupComponent.d.ts +1 -0
- package/dist/src/controls/TabGroup/models/Tab.d.ts +1 -2
- package/dist/src/controls/TableView/TableView.d.ts +0 -2
- package/dist/src/controls/TableView/TableViewConstants.d.ts +2 -7
- package/dist/src/controls/TableView/models/TableViewMenuItem.d.ts +0 -2
- package/dist/src/controls/TableView/services/TableViewService.d.ts +0 -3
- package/dist/src/controls/TableView/services/impl/TableViewServiceImpl.d.ts +1 -5
- package/dist/src/controls/View/View.d.ts +1 -1
- package/dist/src/models/Item.d.ts +1 -0
- package/dist/src/models/ItemId.d.ts +0 -2
- package/dist/src/services/ItemSelectDialogService.d.ts +1 -1
- package/dist/src/services.d.ts +0 -3
- package/lib/dxf-viewer/OrbitControls.js +2 -6
- package/package.json +1 -1
- package/src/controls/BimViewer/js/bim-viewer.js +3 -3
- package/src/controls/DxfViewer/js/dxf-viewer.js +33 -67
- package/src/controls/PdfViewer/js/pdf-viewer.js +4 -748
|
@@ -26,7 +26,6 @@ export interface DialogProps {
|
|
|
26
26
|
};
|
|
27
27
|
isHideFooter?: boolean;
|
|
28
28
|
isShow?: boolean;
|
|
29
|
-
isCustomContentContainer?: boolean;
|
|
30
29
|
dialog?: any;
|
|
31
30
|
className?: string;
|
|
32
31
|
headerClassName?: string;
|
|
@@ -35,6 +34,5 @@ export interface DialogProps {
|
|
|
35
34
|
hiddenContent?: React.ReactNode;
|
|
36
35
|
zIndex?: number;
|
|
37
36
|
children?: React.ReactNode;
|
|
38
|
-
key?: string;
|
|
39
37
|
}
|
|
40
38
|
export declare const Dialog: (props: DialogProps) => JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
export interface RightButtonGroupProps {
|
|
3
3
|
selectedValueList: {
|
|
4
4
|
id: string;
|
|
@@ -16,4 +16,4 @@ export interface RightButtonGroupProps {
|
|
|
16
16
|
id: string;
|
|
17
17
|
}) => string;
|
|
18
18
|
}
|
|
19
|
-
export declare const RightButtonGroup:
|
|
19
|
+
export declare const RightButtonGroup: (props: RightButtonGroupProps) => JSX.Element;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { models } from '../../../models';
|
|
2
2
|
import type { Field } from '../../../models/Field';
|
|
3
|
-
import type { Item } from '../../../models/Item';
|
|
4
3
|
import type { ListConfig } from '../../../models/ListConfig';
|
|
5
4
|
export interface PdfViewerService {
|
|
6
5
|
file: any;
|
|
@@ -26,5 +25,4 @@ export interface PdfViewerService {
|
|
|
26
25
|
container: any;
|
|
27
26
|
getSettingsFromLocalStorage: () => any;
|
|
28
27
|
setSettingsToLocalStorage: (settings: string) => void;
|
|
29
|
-
onIssueTileChange: (issue: Item, changedFieldValueMap: Map<string, unknown>) => void;
|
|
30
28
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
interface ScrollBarProps
|
|
2
|
+
interface ScrollBarProps {
|
|
3
3
|
isHideScrollX?: boolean;
|
|
4
4
|
isFocusOnScroll?: boolean;
|
|
5
|
-
isPreventParentScroll?: boolean;
|
|
6
5
|
onInit?: (container: any) => void;
|
|
7
6
|
children: React.ReactNode;
|
|
8
7
|
className?: string;
|
|
@@ -10,5 +9,5 @@ interface ScrollBarProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
10
9
|
contentClassName?: string;
|
|
11
10
|
onScrollY?: (e: any, element: any) => void;
|
|
12
11
|
}
|
|
13
|
-
export declare const ScrollBar:
|
|
12
|
+
export declare const ScrollBar: (props: ScrollBarProps) => JSX.Element;
|
|
14
13
|
export {};
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
2
|
import { models } from '../../models';
|
|
3
3
|
import type { ListConfig } from '../../models/ListConfig';
|
|
4
4
|
import type { Field } from '../../models/Field';
|
|
5
|
-
import type { SearchService } from './services/SearchService';
|
|
6
5
|
interface SearchProps {
|
|
7
6
|
id: string;
|
|
8
7
|
destination?: string;
|
|
@@ -17,5 +16,5 @@ interface SearchProps {
|
|
|
17
16
|
id: string;
|
|
18
17
|
}[];
|
|
19
18
|
}
|
|
20
|
-
export declare const Search:
|
|
19
|
+
export declare const Search: (props: SearchProps) => JSX.Element;
|
|
21
20
|
export {};
|
|
@@ -4,7 +4,7 @@ export interface TabProps {
|
|
|
4
4
|
active: boolean;
|
|
5
5
|
onClick: (index: number) => void;
|
|
6
6
|
eventKey?: string;
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
icon?: string;
|
|
8
|
+
title: string;
|
|
9
9
|
}
|
|
10
|
-
export declare const Tab: (props: TabProps) => JSX.Element;
|
|
10
|
+
export declare const Tab: (props: TabProps) => JSX.Element | null;
|
|
@@ -9,5 +9,6 @@ export interface TabGroupProps {
|
|
|
9
9
|
itemList: models.Tab[];
|
|
10
10
|
className?: string;
|
|
11
11
|
isDisabled?: boolean;
|
|
12
|
+
isHideSingleHeader?: boolean;
|
|
12
13
|
}
|
|
13
14
|
export declare const TabGroup: React.ForwardRefExoticComponent<TabGroupProps & React.RefAttributes<services.TabGroupService>>;
|
|
@@ -7,6 +7,7 @@ export interface TabGroupComponentProps {
|
|
|
7
7
|
wrap?: boolean;
|
|
8
8
|
itemList: models.Tab[];
|
|
9
9
|
isDisabled?: boolean;
|
|
10
|
+
isHideSingleHeader?: boolean;
|
|
10
11
|
className?: string;
|
|
11
12
|
}
|
|
12
13
|
export declare const TabGroupComponent: React.ForwardRefExoticComponent<TabGroupComponentProps & React.RefAttributes<services.TabGroupService>>;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { interfaces } from 'inversify';
|
|
3
2
|
import { models } from '../../models';
|
|
4
3
|
import { services } from '../../services';
|
|
5
4
|
export declare const TableView: (props: TableViewProps) => JSX.Element;
|
|
@@ -25,5 +24,4 @@ export interface TableViewProps {
|
|
|
25
24
|
isReadOnly?: boolean;
|
|
26
25
|
isNoVScroll?: boolean;
|
|
27
26
|
className?: string;
|
|
28
|
-
container?: interfaces.Container;
|
|
29
27
|
}
|
|
@@ -79,8 +79,7 @@ export declare enum CFG_ATTRIBUTE {
|
|
|
79
79
|
CUSTOM_SCROLL = "CustomScroll",
|
|
80
80
|
SHOW_V_SCROLL = "ShowVScroll",
|
|
81
81
|
MID_WIDTH = "MidWidth",
|
|
82
|
-
RIGHT_WIDTH = "RightWidth"
|
|
83
|
-
SCROLL_TOP = "ScrollTop"
|
|
82
|
+
RIGHT_WIDTH = "RightWidth"
|
|
84
83
|
}
|
|
85
84
|
export declare enum URL {
|
|
86
85
|
LAYOUT = "Layout",
|
|
@@ -144,11 +143,7 @@ export declare enum ATTRIBUTE {
|
|
|
144
143
|
ID = "Id",
|
|
145
144
|
ADDED = "Added",
|
|
146
145
|
FORMULA = "Formula",
|
|
147
|
-
FORMAT = "Format"
|
|
148
|
-
SPAN = "Span",
|
|
149
|
-
LANG = "Lang",
|
|
150
|
-
GMT = "GMT",
|
|
151
|
-
ACTIONS = "Actions"
|
|
146
|
+
FORMAT = "Format"
|
|
152
147
|
}
|
|
153
148
|
export declare enum DRAG_ITEM_TYPE {
|
|
154
149
|
CANNOT_DROP = 0,
|
|
@@ -32,8 +32,6 @@ export interface TableViewService {
|
|
|
32
32
|
refreshMode?: string;
|
|
33
33
|
viewId: string;
|
|
34
34
|
visibleColumnList?: string[];
|
|
35
|
-
disabledActionList: string[];
|
|
36
|
-
linkItemId: string | undefined;
|
|
37
35
|
setSearchCriterionList(searchCriterionList: models.Criterion[], searchId: string): void;
|
|
38
36
|
clearSearchCriterionList(searchId: string): void;
|
|
39
37
|
getSearchCriterionList(searchId?: string): models.Criterion[];
|
|
@@ -139,5 +137,4 @@ export interface TableViewService {
|
|
|
139
137
|
changeDef(row: models.TableViewRow, def: string, show?: boolean, undo?: boolean): void;
|
|
140
138
|
expand(row: models.TableViewRow): void;
|
|
141
139
|
getRequestDataXml(data: string): string;
|
|
142
|
-
getNextCol(col: string): any;
|
|
143
140
|
}
|
|
@@ -15,7 +15,6 @@ export declare class TableViewServiceImpl implements services.TableViewService {
|
|
|
15
15
|
filterRow: models.TableViewRow;
|
|
16
16
|
viewId: string;
|
|
17
17
|
visibleColumnList: string[];
|
|
18
|
-
disabledActionList: string[];
|
|
19
18
|
constructor(grid: any);
|
|
20
19
|
get columnList(): any;
|
|
21
20
|
get columnNameList(): any;
|
|
@@ -43,8 +42,6 @@ export declare class TableViewServiceImpl implements services.TableViewService {
|
|
|
43
42
|
set group(val: string);
|
|
44
43
|
get def(): any;
|
|
45
44
|
get source(): any;
|
|
46
|
-
set linkItemId(id: string | undefined);
|
|
47
|
-
get linkItemId(): string | undefined;
|
|
48
45
|
setSearchCriterionList(searchCriterionList: models.Criterion[], searchId: string): void;
|
|
49
46
|
setCfgAttribute(attr: string, value: any): void;
|
|
50
47
|
getCfgAttribute(attr: string): string;
|
|
@@ -151,8 +148,7 @@ export declare class TableViewServiceImpl implements services.TableViewService {
|
|
|
151
148
|
expand(row: models.TableViewRow): void;
|
|
152
149
|
getRequestDataXml(data: string): string;
|
|
153
150
|
private setXmlPart;
|
|
154
|
-
private
|
|
151
|
+
private setSearchCriterionLisXml;
|
|
155
152
|
private setVisibleColumnListXml;
|
|
156
153
|
private addGanttVisibleColumnList;
|
|
157
|
-
getNextCol(col: string): any;
|
|
158
154
|
}
|
|
@@ -4,7 +4,7 @@ interface ViewProps {
|
|
|
4
4
|
item: any;
|
|
5
5
|
tabList?: Array<any>;
|
|
6
6
|
isDisabled?: boolean;
|
|
7
|
-
|
|
7
|
+
isHideSingleTabHeader?: boolean;
|
|
8
8
|
}
|
|
9
9
|
export declare const View: React.ForwardRefExoticComponent<ViewProps & React.RefAttributes<services.TabGroupService>>;
|
|
10
10
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export interface ItemSelectDialogService {
|
|
2
|
-
show(listId: string, viewId?: string, isMultiSelect?: boolean, isFolderOnly?: boolean,
|
|
2
|
+
show(listId: string, viewId?: string, isMultiSelect?: boolean, isFolderOnly?: boolean, dialogSettings?: {
|
|
3
3
|
title?: string;
|
|
4
4
|
subtitle?: string;
|
|
5
5
|
image?: string;
|
package/dist/src/services.d.ts
CHANGED
|
@@ -24,7 +24,6 @@ import { TreeViewService as _TreeViewService } from './controls/TreeView/service
|
|
|
24
24
|
import { TreeViewEventHandler as _TreeViewEventHandler } from './controls/TreeView/services/TreeViewEventHandler';
|
|
25
25
|
import { TabGroupService as _TabGroupService } from './controls/TabGroup/services/TabGroupService';
|
|
26
26
|
import { DropdownButtonService as _DropdownButtonService } from './controls/DropdownButton/services/DropdownButtonService';
|
|
27
|
-
import { SearchService as _SearchService } from './controls/Search/services/SearchService';
|
|
28
27
|
export declare namespace services {
|
|
29
28
|
interface BimViewerService extends _BimViewerService {
|
|
30
29
|
}
|
|
@@ -78,6 +77,4 @@ export declare namespace services {
|
|
|
78
77
|
}
|
|
79
78
|
interface DropdownButtonService extends _DropdownButtonService {
|
|
80
79
|
}
|
|
81
|
-
interface SearchService extends _SearchService {
|
|
82
|
-
}
|
|
83
80
|
}
|
|
@@ -882,7 +882,7 @@ export const OrbitControls = function ( object, domElement ) {
|
|
|
882
882
|
|
|
883
883
|
case 1:
|
|
884
884
|
|
|
885
|
-
mouseAction = scope.mouseButtons.
|
|
885
|
+
mouseAction = scope.mouseButtons.MIDDLE;
|
|
886
886
|
break;
|
|
887
887
|
|
|
888
888
|
case 2:
|
|
@@ -1022,11 +1022,7 @@ export const OrbitControls = function ( object, domElement ) {
|
|
|
1022
1022
|
|
|
1023
1023
|
function onMouseWheel( event ) {
|
|
1024
1024
|
|
|
1025
|
-
if (scope.enabled === false || scope.enableZoom === false || (state !== STATE.NONE && state !== STATE.ROTATE)) return;
|
|
1026
|
-
|
|
1027
|
-
if (window.dxfViewer?.options && event.isTrusted) {
|
|
1028
|
-
window.dxfViewer.options.autoZoom = false;
|
|
1029
|
-
}
|
|
1025
|
+
if ( scope.enabled === false || scope.enableZoom === false || ( state !== STATE.NONE && state !== STATE.ROTATE ) ) return;
|
|
1030
1026
|
|
|
1031
1027
|
event.preventDefault();
|
|
1032
1028
|
event.stopPropagation();
|
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.227';
|
|
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.227';
|
|
9
9
|
|
|
10
10
|
|
|
11
11
|
//----------------------------------------------------------------------------------------------------------------------
|
|
@@ -3885,7 +3885,7 @@ function bindBtnAddModel() {
|
|
|
3885
3885
|
|
|
3886
3886
|
const filePath = context.getFilePath(itemAttach.id);
|
|
3887
3887
|
const fileName = context.file.fieldValueMap?.name;
|
|
3888
|
-
const model = new BIMCommon.VitroModel(itemId,
|
|
3888
|
+
const model = new BIMCommon.VitroModel(itemId, versionStr, filePath, fileName);
|
|
3889
3889
|
|
|
3890
3890
|
BIMCommon.ModelList.push(model);
|
|
3891
3891
|
|
|
@@ -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.227';
|
|
2
|
+
import { Matrix3, Vector2 } from '/resource/dxfViewer/js/three/three.module.js?version=1.1.227';
|
|
3
|
+
import { Batch, DxfViewer, Layer } from '/resource/dxfViewer/js/viewer/DxfViewer.js?version=1.1.227';
|
|
4
|
+
import { Block as SceneBlock } from '/resource/dxfViewer/js/viewer/DxfScene.js?version=1.1.227';
|
|
5
|
+
import { Block } from '/resource/dxfViewer/js/viewer/DxfViewer.js?version=1.1.227';
|
|
6
|
+
import { DxfScene, Entity, ColorCode } from '/resource/dxfViewer/js/viewer/DxfScene.js?version=1.1.227';
|
|
7
|
+
import { TextRenderer, ParseSpecialChars, HAlign, VAlign } from '/resource/dxfViewer/js/viewer/TextRenderer.js?version=1.1.227';
|
|
8
|
+
import { DxfWorker } from '/resource/dxfViewer/js/viewer/DxfWorker.js?version=1.1.227';
|
|
9
|
+
import { DxfFetcher } from '/resource/dxfViewer/js/viewer/DxfFetcher.js?version=1.1.227';
|
|
10
|
+
import DxfParser from '/resource/dxfViewer/js/viewer/parser/DxfParser.js?version=1.1.227';
|
|
11
|
+
import { RenderBatch } from '/resource/dxfViewer/js/viewer/DxfScene.js?version=1.1.227';
|
|
12
|
+
import { DynamicBuffer, NativeType } from '/resource/dxfViewer/js/viewer/DynamicBuffer.js?version=1.1.227';
|
|
13
|
+
import { OrbitControls } from '/resource/dxfViewer/js/viewer/OrbitControls.js?version=1.1.227';
|
|
14
|
+
import { CSS2DRenderer, CSS2DObject } from '/resource/dxfViewer/js/three/three.module.js?version=1.1.227';
|
|
15
15
|
|
|
16
16
|
let treeViewData = [];
|
|
17
17
|
let notes = [];
|
|
@@ -449,18 +449,6 @@ export class VitroDxfScene extends DxfScene {
|
|
|
449
449
|
delete this.overlays
|
|
450
450
|
}
|
|
451
451
|
|
|
452
|
-
_BuildScene() {
|
|
453
|
-
const scene = super._BuildScene()
|
|
454
|
-
|
|
455
|
-
scene.layers = []
|
|
456
|
-
for (const layer of this.layers.values()) {
|
|
457
|
-
layer.isVisible = layer.visible && !layer.frozen
|
|
458
|
-
scene.layers.push(layer)
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
return scene
|
|
462
|
-
}
|
|
463
|
-
|
|
464
452
|
_ProcessLayers(dxf, xrefMap) {
|
|
465
453
|
if (xrefMap) {
|
|
466
454
|
for (const [, xref] of Object.entries(xrefMap)) {
|
|
@@ -1207,8 +1195,7 @@ export class Viewer extends DxfViewer {
|
|
|
1207
1195
|
options.colorCorrection = true
|
|
1208
1196
|
options.clearColor = new three.Color("#fff")
|
|
1209
1197
|
options.buildScene = true
|
|
1210
|
-
options.retainParsedDxf = true
|
|
1211
|
-
options.autoZoom = true
|
|
1198
|
+
options.retainParsedDxf = true
|
|
1212
1199
|
}
|
|
1213
1200
|
|
|
1214
1201
|
super(domContainer, options)
|
|
@@ -1344,9 +1331,7 @@ export class Viewer extends DxfViewer {
|
|
|
1344
1331
|
this.hasMissingChars = scene.hasMissingChars
|
|
1345
1332
|
|
|
1346
1333
|
for (const layer of scene.layers) {
|
|
1347
|
-
|
|
1348
|
-
layerObj.isVisible = layer.isVisible
|
|
1349
|
-
this.layers.set(layer.name, layerObj)
|
|
1334
|
+
this.layers.set(layer.name, new Layer(layer.name, layer.displayName, layer.color))
|
|
1350
1335
|
}
|
|
1351
1336
|
|
|
1352
1337
|
/* Load all blocks on the first pass. */
|
|
@@ -1451,7 +1436,6 @@ export class Viewer extends DxfViewer {
|
|
|
1451
1436
|
this._Emit("added", { obj })
|
|
1452
1437
|
if (layer) {
|
|
1453
1438
|
layer.PushObject(obj)
|
|
1454
|
-
obj.visible = layer.isVisible
|
|
1455
1439
|
}
|
|
1456
1440
|
}
|
|
1457
1441
|
}
|
|
@@ -1589,13 +1573,13 @@ export class Viewer extends DxfViewer {
|
|
|
1589
1573
|
deltaY: 1,
|
|
1590
1574
|
deltaMode: 0
|
|
1591
1575
|
})
|
|
1592
|
-
this.canvas.dispatchEvent(wheelEvent)
|
|
1576
|
+
this.canvas.dispatchEvent(wheelEvent)
|
|
1593
1577
|
wheelEvent = new WheelEvent('wheel', {
|
|
1594
1578
|
deltaY: -1,
|
|
1595
1579
|
deltaMode: 0,
|
|
1596
1580
|
position: [0, 0, 0]
|
|
1597
1581
|
})
|
|
1598
|
-
this.canvas.dispatchEvent(wheelEvent)
|
|
1582
|
+
this.canvas.dispatchEvent(wheelEvent)
|
|
1599
1583
|
}
|
|
1600
1584
|
|
|
1601
1585
|
RenderVieports(space) {
|
|
@@ -1980,7 +1964,6 @@ export class Viewer extends DxfViewer {
|
|
|
1980
1964
|
}
|
|
1981
1965
|
|
|
1982
1966
|
ZoomIn(scale) {
|
|
1983
|
-
this.options.autoZoom = false;
|
|
1984
1967
|
const centerX = this.canvasWidth / 2 * window.devicePixelRatio;
|
|
1985
1968
|
const centerY = this.canvasHeight / 2 * window.devicePixelRatio;
|
|
1986
1969
|
scale = scale ? scale : Math.pow(0.95, 3);
|
|
@@ -1989,7 +1972,6 @@ export class Viewer extends DxfViewer {
|
|
|
1989
1972
|
}
|
|
1990
1973
|
|
|
1991
1974
|
ZoomOut(scale) {
|
|
1992
|
-
this.options.autoZoom = false;
|
|
1993
1975
|
const centerX = this.canvasWidth / 2 * window.devicePixelRatio;
|
|
1994
1976
|
const centerY = this.canvasHeight / 2 * window.devicePixelRatio;
|
|
1995
1977
|
scale = scale ? scale : Math.pow(0.95, 3);
|
|
@@ -3284,35 +3266,24 @@ for (const eventName of ['loaded', 'cleared', 'destroyed', 'resized', 'pointerdo
|
|
|
3284
3266
|
Subscribe(eventName);
|
|
3285
3267
|
}
|
|
3286
3268
|
|
|
3287
|
-
let lastWheelClickTime = 0;
|
|
3288
|
-
const wheelDblClickThreshold = 400;
|
|
3289
|
-
|
|
3290
3269
|
function emit(eventName, event) {
|
|
3291
3270
|
if (eventName == 'dxf-pointerdown' && event.detail.domEvent.button == 1) {
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
if (window.dxfViewer.spaceName === scene.layouts[i].space) {
|
|
3304
|
-
if (i == scene.layouts.length - 1)
|
|
3305
|
-
layout = scene.layouts[0];
|
|
3306
|
-
else
|
|
3307
|
-
layout = scene.layouts[i + 1];
|
|
3308
|
-
|
|
3309
|
-
break;
|
|
3310
|
-
}
|
|
3271
|
+
var layout = null;
|
|
3272
|
+
const viewer = window.dxfViewer;
|
|
3273
|
+
const scene = viewer.scene;
|
|
3274
|
+
for (let i = 0; i < scene.layouts.length; i++) {
|
|
3275
|
+
if (window.dxfViewer.spaceName === scene.layouts[i].space) {
|
|
3276
|
+
if (i == scene.layouts.length - 1)
|
|
3277
|
+
layout = scene.layouts[0];
|
|
3278
|
+
else
|
|
3279
|
+
layout = scene.layouts[i + 1];
|
|
3280
|
+
|
|
3281
|
+
break;
|
|
3311
3282
|
}
|
|
3283
|
+
}
|
|
3312
3284
|
|
|
3313
|
-
|
|
3314
|
-
|
|
3315
|
-
}
|
|
3285
|
+
if (layout) {
|
|
3286
|
+
|
|
3316
3287
|
}
|
|
3317
3288
|
}
|
|
3318
3289
|
else if (eventName == 'dxf-pointerdown' && event.detail.domEvent.button == 0) {
|
|
@@ -3360,7 +3331,7 @@ function emit(eventName, event) {
|
|
|
3360
3331
|
}
|
|
3361
3332
|
}
|
|
3362
3333
|
else if (eventName == 'dxf-viewChanged') {
|
|
3363
|
-
if (dxfViewer.camera.zoom !== 1
|
|
3334
|
+
if (+$('#scaleSelect').data('value') && dxfViewer.camera.zoom !== 1) {
|
|
3364
3335
|
updateScaleSelectValue();
|
|
3365
3336
|
}
|
|
3366
3337
|
anno.UpdateLabelPosition();
|
|
@@ -3599,17 +3570,12 @@ function doZoomPageFit() {
|
|
|
3599
3570
|
function doZoomAuto() {
|
|
3600
3571
|
doZoomPageFit();
|
|
3601
3572
|
window.dxfViewer.DoFakeZoomToRedrawScene();
|
|
3602
|
-
$('#pageAutoOption').text(context.scaleAutoLabel);
|
|
3603
|
-
$('#scaleSelect').data('value', $('#scaleSelect').val());
|
|
3604
|
-
$('#scaleSelect').val(context.scaleAutoLabel);
|
|
3605
3573
|
}
|
|
3606
3574
|
|
|
3607
3575
|
function changeZoom(scale) {
|
|
3608
3576
|
if (scale === 'auto') {
|
|
3609
|
-
window.dxfViewer.options.autoZoom = true;
|
|
3610
3577
|
doZoomAuto();
|
|
3611
3578
|
} else {
|
|
3612
|
-
window.dxfViewer.options.autoZoom = false;
|
|
3613
3579
|
scale = +scale;
|
|
3614
3580
|
if (scale === 1) {
|
|
3615
3581
|
doZoomPageFit();
|