architwin 1.16.1 → 1.16.2
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/lib/architwin.js +1 -1
- package/lib/atwinui/components/toolbar/i18n.js +4 -2
- package/lib/atwinui/components/toolbar/spacePartition/roomFormPane.d.ts +4 -1
- package/lib/atwinui/components/toolbar/spacePartition/roomFormPane.js +26 -14
- package/lib/atwinui/components/toolbar/spacePartition/roomTreePane.js +19 -3
- package/lib/atwinui/components/toolbar/tagListPane.js +1 -1
- package/lib/atwinui/events.js +5 -5
- package/lib/loaders/planeGeometry2.js +7 -7
- package/package.json +1 -1
|
@@ -277,7 +277,8 @@ i18n
|
|
|
277
277
|
"Window": "Window",
|
|
278
278
|
"CannotBackDrawingMode": "Cannot go back while drawing mode is active.",
|
|
279
279
|
"PleaseOffDrawingMode": "Action cannot be done, please turn off drawing mode.",
|
|
280
|
-
"IotCategoryRequired": "IoT Category is required"
|
|
280
|
+
"IotCategoryRequired": "IoT Category is required",
|
|
281
|
+
"SuccessUpdatedFloorLevel": "Updated the partition's floor level"
|
|
281
282
|
}
|
|
282
283
|
},
|
|
283
284
|
ja: {
|
|
@@ -549,7 +550,8 @@ i18n
|
|
|
549
550
|
"CannotBackDrawingMode": "描画モードがアクティブな間は戻ることができません。",
|
|
550
551
|
"PleaseOffDrawingMode": "操作を行う前に、描画モードをオフにしてください。",
|
|
551
552
|
"Successfully Deleted Tag": "タグを削除しました",
|
|
552
|
-
"IotCategoryRequired": "IoTカテゴリは必須です"
|
|
553
|
+
"IotCategoryRequired": "IoTカテゴリは必須です",
|
|
554
|
+
"SuccessUpdatedFloorLevel": "区画のフロアオフセット値が更新されました"
|
|
553
555
|
}
|
|
554
556
|
}
|
|
555
557
|
},
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { FORM_MODE, PartitionNode, PolygonData, WallPolyData, IObjectData } from "../../../../types";
|
|
2
|
-
export declare let isEditWindow: boolean;
|
|
3
2
|
export declare function renderRoomFormPane(): HTMLDivElement;
|
|
4
3
|
/**
|
|
5
4
|
* Toggles the state of the partition drawing functionality.
|
|
@@ -31,6 +30,7 @@ export declare function displayPartitionFormMode(): void;
|
|
|
31
30
|
*/
|
|
32
31
|
export declare function handlePartitionRowEditBtnClickEvent(partitions: Array<PartitionNode>, targetElement: HTMLElement): void;
|
|
33
32
|
export declare function displayWall(wall: WallPolyData): HTMLElement;
|
|
33
|
+
export declare function setDrawConfig(drawMode: 'window' | 'partition'): void;
|
|
34
34
|
/**
|
|
35
35
|
* Clears the partition form by resetting UI elements and internal data.
|
|
36
36
|
* - Navigates back to the partition list view.
|
|
@@ -123,3 +123,6 @@ export declare function handlePartitionWallEditBtn(wallUuid: string): Promise<vo
|
|
|
123
123
|
export declare function getTempCurrentRoomEditData(): Array<PartitionNode>;
|
|
124
124
|
export declare function setTempCurrentRoomEditData(roomEditData: Array<PartitionNode>): void;
|
|
125
125
|
export declare function getCurrentWall(): WallPolyData;
|
|
126
|
+
export declare function getIsEditWindow(): boolean;
|
|
127
|
+
export declare function setIsEditWindow(value: boolean): void;
|
|
128
|
+
export declare function setCurrentEditWindowIndex(value: number): void;
|
|
@@ -44,7 +44,7 @@ let wallMaterial = '';
|
|
|
44
44
|
let currentEditWindowIndex = null;
|
|
45
45
|
let currentWindowIndex = null;
|
|
46
46
|
let tempCurrentEditRoom = null;
|
|
47
|
-
|
|
47
|
+
let isEditWindow = false;
|
|
48
48
|
export function renderRoomFormPane() {
|
|
49
49
|
log.info("__@ renderRoomFormPane: ", roomFormMode);
|
|
50
50
|
const element = document.createElement('div');
|
|
@@ -939,18 +939,7 @@ function setupEditWindow(element, window) {
|
|
|
939
939
|
currentEditWindowIndex = window.index;
|
|
940
940
|
drawingMode = 'window';
|
|
941
941
|
toggleDrawWindowButton();
|
|
942
|
-
|
|
943
|
-
setCurrentPolygon(currentObject);
|
|
944
|
-
const drawConfig = {
|
|
945
|
-
lineTypeComponentConfig: {
|
|
946
|
-
renderPolygonOnAdd: false,
|
|
947
|
-
drawingMode: drawingMode,
|
|
948
|
-
polygonData: currentObject.object.object_data.json_data,
|
|
949
|
-
targetUUID: currentWall.uuid,
|
|
950
|
-
targetIndex: currentEditWindowIndex
|
|
951
|
-
}
|
|
952
|
-
};
|
|
953
|
-
setDrawingConfig(drawConfig);
|
|
942
|
+
setDrawConfig('window');
|
|
954
943
|
// @ts-ignore
|
|
955
944
|
const windowComponent = {
|
|
956
945
|
inputs: {
|
|
@@ -997,6 +986,20 @@ function setupEditWindow(element, window) {
|
|
|
997
986
|
toggleUndoRedoButtons(false, false);
|
|
998
987
|
});
|
|
999
988
|
}
|
|
989
|
+
export function setDrawConfig(drawMode) {
|
|
990
|
+
log.info("currentObject ", currentObject);
|
|
991
|
+
setCurrentPolygon(currentObject);
|
|
992
|
+
const drawConfig = {
|
|
993
|
+
lineTypeComponentConfig: {
|
|
994
|
+
renderPolygonOnAdd: false,
|
|
995
|
+
drawingMode: drawMode,
|
|
996
|
+
polygonData: currentObject.object.object_data.json_data,
|
|
997
|
+
targetUUID: currentWall.uuid,
|
|
998
|
+
targetIndex: currentEditWindowIndex
|
|
999
|
+
}
|
|
1000
|
+
};
|
|
1001
|
+
setDrawingConfig(drawConfig);
|
|
1002
|
+
}
|
|
1000
1003
|
function saveWallChanges() {
|
|
1001
1004
|
log.info("currentWall", currentWall);
|
|
1002
1005
|
updateWallInPolygon(currentWall);
|
|
@@ -1608,7 +1611,7 @@ function updatePartitionDataArray(payload, currentPartitionDataArray) {
|
|
|
1608
1611
|
else if (drawingMode === 'window') {
|
|
1609
1612
|
log.info("currentPartitionData", currentPartitionData);
|
|
1610
1613
|
// Update current partition data
|
|
1611
|
-
currentPartitionData.polygon_json =
|
|
1614
|
+
currentPartitionData.polygon_json = payload.polygon_json;
|
|
1612
1615
|
// Update current partition data array
|
|
1613
1616
|
const currentPartitionDataIndex = currentPartitionDataArray.findIndex(partitionData => partitionData.uuid == currentPartitionData.uuid);
|
|
1614
1617
|
currentPartitionDataArray[currentPartitionDataIndex] = currentPartitionData;
|
|
@@ -1822,3 +1825,12 @@ export function setTempCurrentRoomEditData(roomEditData) {
|
|
|
1822
1825
|
export function getCurrentWall() {
|
|
1823
1826
|
return currentWall;
|
|
1824
1827
|
}
|
|
1828
|
+
export function getIsEditWindow() {
|
|
1829
|
+
return isEditWindow;
|
|
1830
|
+
}
|
|
1831
|
+
export function setIsEditWindow(value) {
|
|
1832
|
+
isEditWindow = value;
|
|
1833
|
+
}
|
|
1834
|
+
export function setCurrentEditWindowIndex(value) {
|
|
1835
|
+
currentEditWindowIndex = value;
|
|
1836
|
+
}
|
|
@@ -10,9 +10,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { getBundleVersion, extractUUID } from "../../../../utils";
|
|
11
11
|
import { batchAddEventListenerByClassName, handleDeletePartition, handlePartitionVisibility, handlePolygonVisibility, handleWindowVisibility, toggleDisplayPane } from "../../../events";
|
|
12
12
|
import i18n from "../i18n";
|
|
13
|
-
import { getCurrentPolygonData, handlePartitionRowEditBtnClickEvent, handlePartitionWallEditBtn, setPartitionFormMode } from "./roomFormPane";
|
|
13
|
+
import { getCurrentPolygonData, handlePartitionRowEditBtnClickEvent, handlePartitionWallEditBtn, setCurrentEditWindowIndex, setDrawConfig, setDrawingMode, setIsEditWindow, setPartitionFormMode } from "./roomFormPane";
|
|
14
14
|
import { SPACE_EVENTS } from "../../../../types";
|
|
15
|
-
import { _3DXObjects, dispatchSpaceEvent, getChildrenOfModel, goToModel, goToPosition, renderPolygon, setSelectedObject } from "../../../../architwin";
|
|
15
|
+
import { _3DXObjects, dispatchSpaceEvent, enableVerticeControls, getChildrenOfModel, goToModel, goToPosition, renderPolygon, setSelectedObject } from "../../../../architwin";
|
|
16
16
|
import log from 'loglevel';
|
|
17
17
|
import { getShortcutTooltipHTML } from "../static/common";
|
|
18
18
|
let roomDataArray = [];
|
|
@@ -773,11 +773,13 @@ function displayWindows(wall, partitionId, parentId) {
|
|
|
773
773
|
if (!window.options.is_deleted) {
|
|
774
774
|
const windowCoords = JSON.stringify(window.edges);
|
|
775
775
|
const windowCoordsEncoded = btoa(windowCoords);
|
|
776
|
+
const windowPath = JSON.stringify(window.path);
|
|
777
|
+
const windowPathEncoded = btoa(windowPath);
|
|
776
778
|
itemsHTML += `
|
|
777
779
|
<li window-coords="${windowCoordsEncoded}" partition-id="${partitionId}" id="window-${wall.uuid}-${window.index}" wall-id="${wall.uuid}" window-name="${window.name}" window-index="${window.index}" class="at_window_row_item">
|
|
778
780
|
<div>${window.name}</div>
|
|
779
781
|
<div>
|
|
780
|
-
<span window-coords="${windowCoordsEncoded}" partition-id="${partitionId}" partition-parent-uuid="${parentId}" polygon-item-id="${wall.uuid}" index="${window.index}" class="mdi mdi-pencil at_window_edit_btn"></span>
|
|
782
|
+
<span window-path="${windowPathEncoded}" window-coords="${windowCoordsEncoded}" partition-id="${partitionId}" partition-parent-uuid="${parentId}" polygon-item-id="${wall.uuid}" index="${window.index}" class="mdi mdi-pencil at_window_edit_btn"></span>
|
|
781
783
|
<span id="${window.name}" partition-id="${partitionId}" partition-parent-uuid="${parentId}" polygon-item-id="${wall.uuid}" class="mdi ${window.options.is_visible ? 'mdi-eye ' : 'mdi-eye-off'} at_child_visible_btn"></span>
|
|
782
784
|
</div>
|
|
783
785
|
</li>
|
|
@@ -818,6 +820,9 @@ function openPartitionChildEdit(targetElement, parentRoomElement, parentRoomUuid
|
|
|
818
820
|
function openWindowEdit(targetElement, parentRoomElement, parentRoomUuid, partitionId) {
|
|
819
821
|
return __awaiter(this, void 0, void 0, function* () {
|
|
820
822
|
const index = targetElement.getAttribute('index');
|
|
823
|
+
const windowPathEncoded = targetElement.getAttribute('window-path');
|
|
824
|
+
const windowPathJSON = atob(windowPathEncoded);
|
|
825
|
+
const windowPath = JSON.parse(windowPathJSON);
|
|
821
826
|
yield openPartitionChildEdit(targetElement, parentRoomElement, parentRoomUuid, partitionId, true);
|
|
822
827
|
yield new Promise(resolve => requestAnimationFrame(resolve));
|
|
823
828
|
const editBtn = document.querySelector(`#at-edit-window-btn-${index}`);
|
|
@@ -834,6 +839,17 @@ function openWindowEdit(targetElement, parentRoomElement, parentRoomUuid, partit
|
|
|
834
839
|
editBtn.style.display = "none";
|
|
835
840
|
confirmBtn.style.display = "flex";
|
|
836
841
|
inputName.focus();
|
|
842
|
+
setIsEditWindow(true);
|
|
843
|
+
setCurrentEditWindowIndex(Number(index));
|
|
844
|
+
setDrawConfig('window');
|
|
845
|
+
// @ts-ignore
|
|
846
|
+
const windowComponent = {
|
|
847
|
+
inputs: {
|
|
848
|
+
path: windowPath
|
|
849
|
+
}
|
|
850
|
+
};
|
|
851
|
+
enableVerticeControls(windowComponent);
|
|
852
|
+
setDrawingMode(true);
|
|
837
853
|
}
|
|
838
854
|
});
|
|
839
855
|
}
|
|
@@ -414,7 +414,7 @@ export function renderTagRow(tag, tagIconUrl, tag_type = null) {
|
|
|
414
414
|
<td>
|
|
415
415
|
<div class="at_table_button_row">
|
|
416
416
|
<span class="mdi mdi-eye at_visibility_tag_btn ${isGenerallyDisabled ? 'at_disabled' : ''}" id="at-visibility-tag-${tag.id}" data-cy="at-visibility-tag-${tag.id}" tag-id="${tag.id}" tag-id="${tag.id}"></span>
|
|
417
|
-
<span class="mdi mdi-pencil at_edit_tag_btn ${isGenerallyDisabled ? 'at_disabled' : ''}" id="at-edit-tag-${tag.id}" data-cy="at-edit-tag-${tag.id}" tag-id="${tag.id}" target-pane="at-tag-form-pane"></span>
|
|
417
|
+
<span class="mdi mdi-pencil at_edit_tag_btn ${isGenerallyDisabled ? 'at_disabled' : ''}" id="at-edit-tag-${tag.id}" data-cy="at-edit-tag-${tag.id}" tag-id="${tag.id}" target-pane="${isIoT ? 'at-tag-iot-form-pane' : 'at-tag-form-pane'}"></span>
|
|
418
418
|
<span class="mdi mdi-content-copy at_copy_tag_btn ${isTagReadOnly ? 'at_disabled' : ''} id="at-edit-tag-${tag.id}"" id="at-copy-tag-${tag.id}" data-cy="at-copy-tag-${tag.id}" tag-id="${tag.id}"></span>
|
|
419
419
|
<span class="mdi mdi-message at_message_tag_btn ${isIoT ? 'at_hidden' : ''}" id="at-message-tag-${tag.id}" data-cy="at-message-tag-${tag.id}" tag-id="${tag.id}" target-pane="at-tag-messaging-pane"></span>
|
|
420
420
|
<span class="mdi mdi-map-marker at_locate_tag_btn ${!isIoT ? 'at_hidden' : ''} ${isIotTagReadOnly ? 'at_disabled' : ''}" id="at-relocate-tag-${tag.id}" data-cy="at-relocate-tag-${tag.id}" tag-id="${tag.id}"></span>
|
package/lib/atwinui/events.js
CHANGED
|
@@ -2535,7 +2535,7 @@ function handleFloorLevelInputChange() {
|
|
|
2535
2535
|
notyf.success(`${i18n.t('SuccessBaseHeight')}`);
|
|
2536
2536
|
const objects = get3DXObjects();
|
|
2537
2537
|
const latestObj = objects[objects.length - 1];
|
|
2538
|
-
const currentPartitionData =
|
|
2538
|
+
const currentPartitionData = getCurrentPartitionData();
|
|
2539
2539
|
const currentPolygon = getCurrentPolygon();
|
|
2540
2540
|
log.info("latestObj ", latestObj);
|
|
2541
2541
|
if (currentPartitionData) {
|
|
@@ -2551,7 +2551,7 @@ function handleFloorLevelInputChange() {
|
|
|
2551
2551
|
return path;
|
|
2552
2552
|
});
|
|
2553
2553
|
renderPolygon(updatedPath);
|
|
2554
|
-
notyf.success(
|
|
2554
|
+
notyf.success(`${i18n.t('SuccessUpdatedFloorLevel')}`);
|
|
2555
2555
|
}
|
|
2556
2556
|
else {
|
|
2557
2557
|
log.error("No matching uuid for the polygon");
|
|
@@ -2566,7 +2566,7 @@ function handleFloorLevelInputChange() {
|
|
|
2566
2566
|
return path;
|
|
2567
2567
|
});
|
|
2568
2568
|
renderPolygon(updatedPath);
|
|
2569
|
-
notyf.success(
|
|
2569
|
+
notyf.success(`${i18n.t('SuccessUpdatedFloorLevel')}`);
|
|
2570
2570
|
}
|
|
2571
2571
|
else {
|
|
2572
2572
|
log.warn("currentPartitionData and latestObj value is undefined or its type is not valid");
|
|
@@ -2588,7 +2588,7 @@ function handleMarkFloor() {
|
|
|
2588
2588
|
});
|
|
2589
2589
|
yield getTargetPosition((coord) => {
|
|
2590
2590
|
const objects = get3DXObjects();
|
|
2591
|
-
const currentPartitionData =
|
|
2591
|
+
const currentPartitionData = getCurrentPartitionData();
|
|
2592
2592
|
const currentPolygon = getCurrentPolygon();
|
|
2593
2593
|
log.info("coord ", coord);
|
|
2594
2594
|
if (coord.y < -1) {
|
|
@@ -2627,7 +2627,7 @@ function handleMarkFloor() {
|
|
|
2627
2627
|
return path;
|
|
2628
2628
|
});
|
|
2629
2629
|
renderPolygon(updatedPath);
|
|
2630
|
-
notyf.success(
|
|
2630
|
+
notyf.success(`${i18n.t('SuccessUpdatedFloorLevel')}`);
|
|
2631
2631
|
}
|
|
2632
2632
|
else {
|
|
2633
2633
|
log.warn("currentPolygon is undefined");
|
|
@@ -539,10 +539,10 @@ class PlaneVideo {
|
|
|
539
539
|
});
|
|
540
540
|
// socketEmit({socketEvent: IO_SPACE_EVENTS.MEDIA_SCREEN, data: {event: IO_MEDIASCREEN_EVENTS.PAUSE, mediaViewerId: this.inputs.mediaViewerId }})
|
|
541
541
|
}
|
|
542
|
-
else if (this.audio === 'unmuted' && eventData['collider'].name == '
|
|
542
|
+
else if (this.audio === 'unmuted' && eventData['collider'].name == 'unmuteBtn') {
|
|
543
543
|
this.planeElement.muted = true;
|
|
544
|
-
this.muteButtonModel.visible =
|
|
545
|
-
this.unmuteButtonModel.visible =
|
|
544
|
+
this.muteButtonModel.visible = true;
|
|
545
|
+
this.unmuteButtonModel.visible = false;
|
|
546
546
|
this.audio = 'muted';
|
|
547
547
|
const { duration, currentTime } = getVideoMetadata(this.planeElement);
|
|
548
548
|
dispatchSpaceEvent(SPACE_EVENTS.MEDIA_MUTE, {
|
|
@@ -555,10 +555,10 @@ class PlaneVideo {
|
|
|
555
555
|
});
|
|
556
556
|
// socketEmit({socketEvent: IO_SPACE_EVENTS.MEDIA_SCREEN, data: {event: IO_MEDIASCREEN_EVENTS.MUTE, mediaViewerId: this.inputs.mediaViewerId }})
|
|
557
557
|
}
|
|
558
|
-
else if (this.audio === 'muted' && eventData['collider'].name == '
|
|
558
|
+
else if (this.audio === 'muted' && eventData['collider'].name == 'muteBtn') {
|
|
559
559
|
this.planeElement.muted = false;
|
|
560
|
-
this.muteButtonModel.visible =
|
|
561
|
-
this.unmuteButtonModel.visible =
|
|
560
|
+
this.muteButtonModel.visible = false;
|
|
561
|
+
this.unmuteButtonModel.visible = true;
|
|
562
562
|
this.audio = 'unmuted';
|
|
563
563
|
const { duration, currentTime } = getVideoMetadata(this.planeElement);
|
|
564
564
|
dispatchSpaceEvent(SPACE_EVENTS.MEDIA_UNMUTE, {
|
|
@@ -692,6 +692,7 @@ class PlaneVideo {
|
|
|
692
692
|
transparent: true,
|
|
693
693
|
alphaTest: 0.5
|
|
694
694
|
}));
|
|
695
|
+
this.muteButtonModel.visible = false;
|
|
695
696
|
this.muteButtonModel.name = "muteBtn";
|
|
696
697
|
this.mesh.add(this.muteButtonModel);
|
|
697
698
|
}
|
|
@@ -707,7 +708,6 @@ class PlaneVideo {
|
|
|
707
708
|
transparent: true,
|
|
708
709
|
alphaTest: 0.5
|
|
709
710
|
}));
|
|
710
|
-
this.unmuteButtonModel.visible = false;
|
|
711
711
|
this.unmuteButtonModel.name = "unmuteBtn";
|
|
712
712
|
this.mesh.add(this.unmuteButtonModel);
|
|
713
713
|
}
|