architwin 1.14.14 → 1.14.16
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.d.ts +2 -1
- package/lib/architwin.js +1 -1
- package/lib/atwinui/components/toolbar/spacePartition/roomFormPane.js +21 -12
- package/lib/atwinui/components/toolbar/spacePartition/roomTreePane.d.ts +0 -1
- package/lib/atwinui/components/toolbar/spacePartition/roomTreePane.js +35 -18
- package/lib/atwinui/components/toolbar/tagIotFormPane.js +45 -16
- package/lib/atwinui/components/toolbar/viewingRemoteSpace.d.ts +0 -1
- package/lib/atwinui/components/toolbar/viewingRemoteSpace.js +0 -6
- package/lib/atwinui/events.d.ts +4 -3
- package/lib/atwinui/events.js +45 -7
- package/package.json +1 -1
- package/static/atwinui.css +33 -0
- package/static/utility.css +1 -1
|
@@ -114,14 +114,20 @@ export function renderRoomFormPane() {
|
|
|
114
114
|
</div>
|
|
115
115
|
|
|
116
116
|
<div class="at_edit_name" id="at-edit-wall-material" style="display: none;">
|
|
117
|
-
<input class="at_edit_name_input" type="text" id="at-edit-wall-input" data-cy="at-edit-wall-material-input" placeholder="${i18n.t('EnterWallMaterial')}" disabled
|
|
117
|
+
<input class="at_edit_name_input at_text_xs" type="text" id="at-edit-wall-input" data-cy="at-edit-wall-material-input" placeholder="${i18n.t('EnterWallMaterial')}" disabled>
|
|
118
118
|
<span class="mdi mdi-pencil" style="display: none; cursor: pointer;" id="at-wall-edit-material-btn"></span>
|
|
119
|
-
<span class="mdi mdi-check" id="at-confirm-edit-wall-btn" style="display: none;"></span>
|
|
119
|
+
<!-- <span class="mdi mdi-check" id="at-confirm-edit-wall-btn" style="display: none;"></span> -->
|
|
120
|
+
<div class="at_save_button at_text_xs at_ghost" id="at-confirm-edit-wall-btn" data-cy="at-confirm-edit-wall-btn" style="display: none;">
|
|
121
|
+
${i18n.t('Save')}
|
|
122
|
+
</div>
|
|
120
123
|
</div>
|
|
121
124
|
|
|
122
125
|
<div class="at_edit_name" id="at-edit-partition-name">
|
|
123
|
-
<input class="at_edit_name_input" type="text" name="edit_partition_name" id="at-edit-partition-name-input" data-cy="at-edit-partition-name-input">
|
|
124
|
-
<span class="mdi mdi-check" id="at-confirm-edit-partition-name"></span>
|
|
126
|
+
<input class="at_edit_name_input at_text_xs" type="text" name="edit_partition_name" id="at-edit-partition-name-input" data-cy="at-edit-partition-name-input">
|
|
127
|
+
<!-- <span class="mdi mdi-check" id="at-confirm-edit-partition-name"></span> -->
|
|
128
|
+
<div class="at_save_button at_text_xs at_ghost" id="at-confirm-edit-partition-name" data-cy="at-confirm-edit-partition-name">
|
|
129
|
+
${i18n.t('Save')}
|
|
130
|
+
</div>
|
|
125
131
|
</div>
|
|
126
132
|
|
|
127
133
|
<!-- Partition Add Mode -->
|
|
@@ -751,7 +757,7 @@ function displayFaces(polygon) {
|
|
|
751
757
|
const floorMaterialField = document.getElementById('at-edit-floor-material-input');
|
|
752
758
|
floorMaterialField.disabled = false;
|
|
753
759
|
floorMaterialEdit.style.display = "none";
|
|
754
|
-
floorMaterialConfirm.style.display = "
|
|
760
|
+
floorMaterialConfirm.style.display = "inline-flex";
|
|
755
761
|
}));
|
|
756
762
|
addEventListenerById('at-confirm-edit-wall-btn', () => __awaiter(this, void 0, void 0, function* () {
|
|
757
763
|
console.log('@caroline wall check', wallMaterial, currentWall.material, currentWall);
|
|
@@ -775,7 +781,7 @@ function displayFaces(polygon) {
|
|
|
775
781
|
const wallMaterialInput = document.getElementById('at-edit-wall-input');
|
|
776
782
|
wallMaterialInput.disabled = false;
|
|
777
783
|
wallEditMaterial.style.display = "none";
|
|
778
|
-
wallConfirmMaterial.style.display = "
|
|
784
|
+
wallConfirmMaterial.style.display = "inline-flex";
|
|
779
785
|
});
|
|
780
786
|
}
|
|
781
787
|
function displayWall(wall) {
|
|
@@ -1118,9 +1124,12 @@ function displayFloor(floor, walls, floorModel) {
|
|
|
1118
1124
|
</div>
|
|
1119
1125
|
|
|
1120
1126
|
<div class="at_edit_name" id="at-edit-floor-material">
|
|
1121
|
-
<input class="at_edit_name_input at_ml_1" type="text" id="at-edit-floor-material-input" data-cy="at-edit-floor-material-input" value="${floor.material ? floor.material : ''}" placeholder="${i18n.t('EnterFloorMaterial')}"
|
|
1127
|
+
<input class="at_edit_name_input at_ml_1 at_text_xs" type="text" id="at-edit-floor-material-input" data-cy="at-edit-floor-material-input" value="${floor.material ? floor.material : ''}" placeholder="${i18n.t('EnterFloorMaterial')}">
|
|
1122
1128
|
<span class="mdi mdi-pencil at_mr-1" style="display: none; cursor: pointer;" id="at-floor-edit-material-btn"></span>
|
|
1123
|
-
<span class="mdi mdi-check at_mr-1" id="at-confirm-edit-floor-name" style="display: none;"></span>
|
|
1129
|
+
<!-- <span class="mdi mdi-check at_mr-1" id="at-confirm-edit-floor-name" style="display: none;"></span> -->
|
|
1130
|
+
<div class="at_save_button at_text_xs at_ghost" id="at-confirm-edit-floor-name" data-cy="at-confirm-edit-floor-name" style="display: none;">
|
|
1131
|
+
${i18n.t('Save')}
|
|
1132
|
+
</div>
|
|
1124
1133
|
</div>
|
|
1125
1134
|
|
|
1126
1135
|
<div class="at_dropdown_item_container" id="at-vertex-list-${floor.uuid}" data-cy="at-vertex-list-${floor.uuid}" style="display: flex;"></div>
|
|
@@ -1564,10 +1573,10 @@ function onModeDetectFloorInput(event) {
|
|
|
1564
1573
|
const floorConfirmMaterial = document.getElementById('at-confirm-edit-floor-name');
|
|
1565
1574
|
if (floorMaterialValue) {
|
|
1566
1575
|
floorEditMaterial.style.display = "none";
|
|
1567
|
-
floorConfirmMaterial.style.display = "
|
|
1576
|
+
floorConfirmMaterial.style.display = "inline-flex";
|
|
1568
1577
|
}
|
|
1569
1578
|
else {
|
|
1570
|
-
floorEditMaterial.style.display = "
|
|
1579
|
+
floorEditMaterial.style.display = "inline-flex";
|
|
1571
1580
|
floorConfirmMaterial.style.display = "none";
|
|
1572
1581
|
}
|
|
1573
1582
|
}
|
|
@@ -1584,10 +1593,10 @@ function onModeDetectWallInput(event) {
|
|
|
1584
1593
|
setWallMaterial(wallMaterialValue);
|
|
1585
1594
|
if (wallMaterialValue) {
|
|
1586
1595
|
wallEditMaterial.style.display = "none";
|
|
1587
|
-
wallConfirmMaterial.style.display = "
|
|
1596
|
+
wallConfirmMaterial.style.display = "inline-flex";
|
|
1588
1597
|
}
|
|
1589
1598
|
else {
|
|
1590
|
-
wallEditMaterial.style.display = "
|
|
1599
|
+
wallEditMaterial.style.display = "inline-flex";
|
|
1591
1600
|
wallConfirmMaterial.style.display = "none";
|
|
1592
1601
|
}
|
|
1593
1602
|
}
|
|
@@ -77,7 +77,6 @@ export declare function updateRoomVisibilityUI(parentId: string, isVisible: bool
|
|
|
77
77
|
export declare function highlightSelectedPartitionChild(partitionId: string, name: string): void;
|
|
78
78
|
export declare function toggeleExpandParitionWallChild(partitionId: string, name: string): void;
|
|
79
79
|
export declare function highlightSelectedWallWindow(wallUuid: string, index: number | string): void;
|
|
80
|
-
export declare function toggleHighlightedPartitionItem(): void;
|
|
81
80
|
export declare function toggleHighlightedWindowItem(): void;
|
|
82
81
|
export declare function calculateMidPoint(coords: Array<{
|
|
83
82
|
start: Vector3;
|
|
@@ -351,14 +351,27 @@ function toggleSelectedPartition() {
|
|
|
351
351
|
handlePartitionVisibility(target.id);
|
|
352
352
|
}));
|
|
353
353
|
batchAddEventListenerByClassName('at_child_visible_btn', (event) => __awaiter(this, void 0, void 0, function* () {
|
|
354
|
+
var _a;
|
|
354
355
|
const target = event.target;
|
|
355
356
|
const li = target.closest('li');
|
|
356
|
-
if (li === null || li === void 0 ? void 0 : li.getAttribute('id').toLowerCase().includes('window')) {
|
|
357
|
+
if ((_a = li === null || li === void 0 ? void 0 : li.getAttribute('id')) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes('window')) {
|
|
357
358
|
event.stopPropagation();
|
|
358
|
-
handleWindowVisibility(target);
|
|
359
|
+
handleWindowVisibility(target, true);
|
|
359
360
|
}
|
|
360
361
|
else {
|
|
361
|
-
handlePolygonVisibility(target.id);
|
|
362
|
+
const parentVisibleState = yield handlePolygonVisibility(target.id);
|
|
363
|
+
yield new Promise(resolve => setTimeout(resolve, 0));
|
|
364
|
+
yield new Promise(resolve => requestAnimationFrame(resolve));
|
|
365
|
+
const wallId = target.getAttribute('polygon-item-id');
|
|
366
|
+
const windowItems = document.querySelectorAll(`li.at_wall_window_row_item[wall-id="${wallId}"]`);
|
|
367
|
+
if (windowItems && windowItems.length > 0) {
|
|
368
|
+
windowItems.forEach((windowLi) => {
|
|
369
|
+
const visibilityBtn = windowLi.querySelector('.at_child_visible_btn');
|
|
370
|
+
if (visibilityBtn) {
|
|
371
|
+
handleWindowVisibility(visibilityBtn, false, parentVisibleState);
|
|
372
|
+
}
|
|
373
|
+
});
|
|
374
|
+
}
|
|
362
375
|
}
|
|
363
376
|
}));
|
|
364
377
|
batchAddEventListenerByClassName('at_partition_wall_row_item', (event) => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -398,10 +411,10 @@ function toggleSelectedPartition() {
|
|
|
398
411
|
}
|
|
399
412
|
}));
|
|
400
413
|
batchAddEventListenerByClassName('at_child_edit_btn', (event) => __awaiter(this, void 0, void 0, function* () {
|
|
401
|
-
var
|
|
414
|
+
var _b;
|
|
402
415
|
event.stopPropagation();
|
|
403
416
|
const target = event.target;
|
|
404
|
-
const isWall = ((
|
|
417
|
+
const isWall = ((_b = target.getAttribute('is-wall')) === null || _b === void 0 ? void 0 : _b.toLowerCase()) === 'true';
|
|
405
418
|
const partitionId = target.getAttribute('partition-id');
|
|
406
419
|
const parentRoomUuid = target.getAttribute('partition-parent-uuid');
|
|
407
420
|
const parentRoom = document.getElementById(`at-room-edit-${parentRoomUuid}-btn`);
|
|
@@ -600,6 +613,10 @@ export function updatePolygonVisibilityData(isVisible, currPartition, isFloor, p
|
|
|
600
613
|
log.info("WALL!");
|
|
601
614
|
// WALLS
|
|
602
615
|
targetItem = polygonJson.walls.find(item => item.uuid === polygonItemId) || null;
|
|
616
|
+
// <START_COMMENT> TODO: 16032 - uncomment when polygon loader window visibility update is implemented
|
|
617
|
+
// const windows = targetItem?.windows || null
|
|
618
|
+
// windows?.forEach(w => w.options.is_visible = isVisible)
|
|
619
|
+
// <END_COMMENT> TODO: 16032 - uncomment when polygon loader window visibility update is implemented
|
|
603
620
|
}
|
|
604
621
|
log.info("targetItem:", targetItem);
|
|
605
622
|
if (targetItem) {
|
|
@@ -743,13 +760,13 @@ function displayWindows(wall, partitionId, parentId) {
|
|
|
743
760
|
const windowCoords = JSON.stringify(window.edges);
|
|
744
761
|
const windowCoordsEncoded = btoa(windowCoords);
|
|
745
762
|
itemsHTML += `
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
763
|
+
<li window-coords="${windowCoordsEncoded}" id="window-${wall.uuid}-${window.index}" wall-id="${wall.uuid}" window-name="${window.name}" window-index="${window.index}" class="at_wall_window_row_item">
|
|
764
|
+
<div>${window.name}</div>
|
|
765
|
+
<div>
|
|
766
|
+
<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>
|
|
767
|
+
<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>
|
|
768
|
+
</div>
|
|
769
|
+
</li>
|
|
753
770
|
`;
|
|
754
771
|
}
|
|
755
772
|
});
|
|
@@ -810,15 +827,15 @@ export function highlightSelectedWallWindow(wallUuid, index) {
|
|
|
810
827
|
const wallWindow = document.querySelectorAll(`li[wall-id="${wallUuid}"]`);
|
|
811
828
|
const targetId = `window-${wallUuid}-${index}`;
|
|
812
829
|
wallWindow.forEach((windowElement) => {
|
|
830
|
+
if (windowElement.id === targetId) {
|
|
831
|
+
const parentWallItem = windowElement.closest('li.at_partition_wall_row_item');
|
|
832
|
+
const partitionId = parentWallItem.getAttribute('partition-li-id');
|
|
833
|
+
const objectName = parentWallItem.getAttribute('object-name');
|
|
834
|
+
toggeleExpandParitionWallChild(partitionId, objectName);
|
|
835
|
+
}
|
|
813
836
|
windowElement.classList.toggle('selected', windowElement.id === targetId);
|
|
814
837
|
});
|
|
815
838
|
}
|
|
816
|
-
export function toggleHighlightedPartitionItem() {
|
|
817
|
-
const windowItems = document.querySelectorAll('li.at_wall_window_row_item.selected');
|
|
818
|
-
windowItems.forEach(el => {
|
|
819
|
-
el.classList.remove('selected');
|
|
820
|
-
});
|
|
821
|
-
}
|
|
822
839
|
export function toggleHighlightedWindowItem() {
|
|
823
840
|
const windowItems = document.querySelectorAll('li.at_wall_window_row_item.selected');
|
|
824
841
|
windowItems.forEach(el => {
|
|
@@ -570,6 +570,7 @@ function renderDeviceRow(payload) {
|
|
|
570
570
|
const deviceRow = document.createElement('div');
|
|
571
571
|
deviceRow.classList.add('at_flex_row');
|
|
572
572
|
deviceRow.classList.add('at_item');
|
|
573
|
+
deviceRow.id = `at-data-device-id-${payload.id}`;
|
|
573
574
|
deviceRow.innerHTML = `
|
|
574
575
|
<div class="at_subitem_left">
|
|
575
576
|
<span class="mdi mdi-cube-outline"></span>
|
|
@@ -599,23 +600,9 @@ function renderDeviceRow(payload) {
|
|
|
599
600
|
const devId = selectedDevice.id.split('at-delete-device-')[1];
|
|
600
601
|
// finds the index of the selected device
|
|
601
602
|
const findDevice = linkedDevicesArray.findIndex(dev => dev.id === devId);
|
|
602
|
-
if (findDevice
|
|
603
|
+
if (findDevice !== -1) {
|
|
603
604
|
selectedDevice.setAttribute('disabled', 'true');
|
|
604
|
-
|
|
605
|
-
if (parent) {
|
|
606
|
-
// displays delete Device back in Dropdown List
|
|
607
|
-
const findHideDev = document.querySelector(`div[iot-device-uuid="${devId}"]`);
|
|
608
|
-
const devicesDropdown = document.getElementById('at-iot-selected-device');
|
|
609
|
-
if (findHideDev) {
|
|
610
|
-
findHideDev.style.display = "block";
|
|
611
|
-
parent.style.display = 'none';
|
|
612
|
-
linkedDevicesArray.splice(findDevice, 1);
|
|
613
|
-
}
|
|
614
|
-
if (linkedDevicesArray.length === 0) {
|
|
615
|
-
devicesDropdown.innerText = i18n.t('SelectDevice');
|
|
616
|
-
setIotDeviceOptions();
|
|
617
|
-
}
|
|
618
|
-
}
|
|
605
|
+
deleteDeviceRow(devId);
|
|
619
606
|
toggleModal(false);
|
|
620
607
|
notify.success(`${i18n.t('SuccessDeleteDevice')}`);
|
|
621
608
|
selectedDevice.setAttribute('disabled', 'false');
|
|
@@ -630,6 +617,48 @@ function renderDeviceRow(payload) {
|
|
|
630
617
|
return;
|
|
631
618
|
}
|
|
632
619
|
}
|
|
620
|
+
// 🗑️ Delete row function
|
|
621
|
+
function deleteDeviceRow(deviceId) {
|
|
622
|
+
log.info('deleteDeviceRow()', deviceId);
|
|
623
|
+
// 1️⃣ Normalize ID for matching
|
|
624
|
+
const normalizedId = String(deviceId).trim();
|
|
625
|
+
// 2️⃣ Remove from DOM
|
|
626
|
+
// const deviceRow = document.querySelector<HTMLElement>(`[at-data-device-id-"${normalizedId}"]`)
|
|
627
|
+
const deviceRow = document.getElementById(`at-data-device-id-${normalizedId}`);
|
|
628
|
+
if (deviceRow) {
|
|
629
|
+
deviceRow.remove();
|
|
630
|
+
log.info(`Device row [${normalizedId}] removed from DOM.`);
|
|
631
|
+
}
|
|
632
|
+
else {
|
|
633
|
+
log.warn(`No DOM element found for device [${normalizedId}]`);
|
|
634
|
+
}
|
|
635
|
+
// 3️⃣ Remove from linkedDevicesArray (if defined)
|
|
636
|
+
if (Array.isArray(linkedDevicesArray)) {
|
|
637
|
+
const index = linkedDevicesArray.findIndex(d => String(d.id).trim() === normalizedId);
|
|
638
|
+
if (index !== -1) {
|
|
639
|
+
linkedDevicesArray.splice(index, 1);
|
|
640
|
+
log.info(`Device [${normalizedId}] removed from linkedDevicesArray.`);
|
|
641
|
+
}
|
|
642
|
+
else {
|
|
643
|
+
log.warn(`Device [${normalizedId}] not found in linkedDevicesArray.`);
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
// 4️⃣ Show the deleted device again in dropdown (if exists)
|
|
647
|
+
const dropdownItem = document.querySelector(`div[iot-device-uuid="${normalizedId}"]`);
|
|
648
|
+
if (dropdownItem) {
|
|
649
|
+
dropdownItem.style.display = 'block';
|
|
650
|
+
log.info(`Dropdown item for device [${normalizedId}] shown again.`);
|
|
651
|
+
}
|
|
652
|
+
// 5️⃣ Update dropdown label if no devices remain
|
|
653
|
+
const devicesContainer = document.getElementById('at-device-item-container');
|
|
654
|
+
if (devicesContainer && devicesContainer.children.length === 0) {
|
|
655
|
+
const devicesDropdown = document.getElementById('at-iot-selected-device');
|
|
656
|
+
if (devicesDropdown) {
|
|
657
|
+
devicesDropdown.innerText = i18n.t('SelectDevice');
|
|
658
|
+
log.info(`Dropdown label reset to "SelectDevice".`);
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
}
|
|
633
662
|
/**
|
|
634
663
|
* Clears all Fields Input Fields including the Linked Devices Table
|
|
635
664
|
*
|
|
@@ -6,4 +6,3 @@ export declare function renderViewingRemoteSpace(): HTMLElement;
|
|
|
6
6
|
*/
|
|
7
7
|
export declare function renderRemoteSpaceViewing(user: ScreenShareUser): void;
|
|
8
8
|
export declare function handleRemoteViewResponsiveChanges(): void;
|
|
9
|
-
export declare function handleScreenShareRemoteEndSessionEvent(): void;
|
|
@@ -100,9 +100,3 @@ export function handleRemoteViewResponsiveChanges() {
|
|
|
100
100
|
container.classList.toggle("at_display_flex_end", isMobile);
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
export function handleScreenShareRemoteEndSessionEvent() {
|
|
104
|
-
const element = document.getElementById("at-viewing-remote-space-pane");
|
|
105
|
-
if (element) {
|
|
106
|
-
element.style.display = 'none';
|
|
107
|
-
}
|
|
108
|
-
}
|
package/lib/atwinui/events.d.ts
CHANGED
|
@@ -37,11 +37,12 @@ declare function handlePartitionVisibility(targetId: string): Promise<void>;
|
|
|
37
37
|
* Toggles the visibility of the child partitions within a partition tree. (FLOOR and WALLS)
|
|
38
38
|
* @param {string} targetId - ID of the target partition element.
|
|
39
39
|
*/
|
|
40
|
-
declare function handlePolygonVisibility(targetId: string): Promise<
|
|
40
|
+
declare function handlePolygonVisibility(targetId: string): Promise<boolean>;
|
|
41
41
|
declare function handleDeletePartition(targetId: string): void;
|
|
42
42
|
/**
|
|
43
43
|
* Handles the display logic for showing the custom minimap.
|
|
44
44
|
*/
|
|
45
45
|
declare function handleShowCustomMinimap(): void;
|
|
46
|
-
declare function handleWindowVisibility(visibilityBtn: HTMLElement): Promise<void>;
|
|
47
|
-
|
|
46
|
+
declare function handleWindowVisibility(visibilityBtn: HTMLElement, updateStateDB: boolean, fromParentVisibilityState?: boolean): Promise<void>;
|
|
47
|
+
declare function clearActivePane(): void;
|
|
48
|
+
export { activeToolbarItem, activeActionItem, cancelModelPlacementPrompt, isCustomMapControlsVisible, pipeColor, batchAddEventListenerById, batchAddEventListenerByClassName, batchAddEventListenerByClassNames, batchAddEventListenerByDataAttribute, setActiveToolbarItem, toggleDisplayPane, toggleActionBar, setupIndividualEventListeners, setupSpaceEventSubscriptions, handleModelVisibility, handleDeleteModel, handleShowMinimap, handleScrollToView, handleRenderMeetingUI, handleShowCustomMinimap, handlePartitionVisibility, handlePolygonVisibility, handleDeletePartition, handleWindowVisibility, clearActivePane };
|
package/lib/atwinui/events.js
CHANGED
|
@@ -30,7 +30,7 @@ import { getBasepointCalibrateBpCoordinateValues, getBasepointCalibrateMpCoordin
|
|
|
30
30
|
import { toggleGeneralMapOptions, initGeneralSelectedMap, getSelectedMapOption } from './components/toolbar/generalSettingsMenuPane';
|
|
31
31
|
import { searchTagList, setSearchTagTerm, searchClearfield, getSearchTagTerm, sortTags, updateSelectedTagSortOption, resetSelectedTagSortOption } from './components/toolbar/tagListPane';
|
|
32
32
|
import { renderUserRows } from "./components/toolbar/spaceUserListPane";
|
|
33
|
-
import { handleRemoteViewResponsiveChanges,
|
|
33
|
+
import { handleRemoteViewResponsiveChanges, renderRemoteSpaceViewing } from "./components/toolbar/viewingRemoteSpace";
|
|
34
34
|
import { PipeList } from "./components/toolbar/pipeListPane";
|
|
35
35
|
import { PipeForm } from "./components/toolbar/pipeFormPane";
|
|
36
36
|
import { unsendComment, timedoutComment, getTheseTagMessages } from './components/toolbar/tagMessagingPane';
|
|
@@ -1439,7 +1439,6 @@ function setupSpaceEventSubscriptions() {
|
|
|
1439
1439
|
subscribeSpaceEvent(SPACE_EVENTS.SCREEN_SHARE_HOST_END_SESSION, handleScreenShareEndSessionEvent);
|
|
1440
1440
|
subscribeSpaceEvent(SPACE_EVENTS.SCREEN_SHARE_ACCEPT_REQUEST, handleScreenShareAcceptRequest);
|
|
1441
1441
|
subscribeSpaceEvent(SPACE_EVENTS.SCREEN_SHARE_BACK_USER_LIST_PANE, handleScreenShareBackUserListPane);
|
|
1442
|
-
subscribeSpaceEvent(SPACE_EVENTS.SCREEN_SHARE_TERMINATED, handleScreenShareRemoteEndSessionEvent);
|
|
1443
1442
|
}
|
|
1444
1443
|
function handlePartitionColiderClickSelected(payload) {
|
|
1445
1444
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -1935,9 +1934,11 @@ function handlePolygonVisibility(targetId) {
|
|
|
1935
1934
|
const parentId = thisPartition.parent_uuid;
|
|
1936
1935
|
updateRoomVisibilityUI(parentId, true);
|
|
1937
1936
|
}
|
|
1937
|
+
return isVisible;
|
|
1938
1938
|
}
|
|
1939
1939
|
catch (error) {
|
|
1940
1940
|
console.error("Error partitionchild visibility: ", error);
|
|
1941
|
+
return null;
|
|
1941
1942
|
}
|
|
1942
1943
|
});
|
|
1943
1944
|
}
|
|
@@ -3296,31 +3297,68 @@ function handleClickEventInObjectSortOption() {
|
|
|
3296
3297
|
});
|
|
3297
3298
|
}
|
|
3298
3299
|
}
|
|
3299
|
-
function handleWindowVisibility(visibilityBtn) {
|
|
3300
|
+
function handleWindowVisibility(visibilityBtn, updateStateDB, fromParentVisibilityState) {
|
|
3300
3301
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3301
3302
|
try {
|
|
3302
3303
|
const partitionId = visibilityBtn.getAttribute('partition-id');
|
|
3303
3304
|
const windowIndex = visibilityBtn.closest('li').getAttribute('window-index');
|
|
3304
3305
|
const wallId = visibilityBtn.closest('li').getAttribute('wall-id');
|
|
3305
3306
|
const windowNameAsMeshChild = `${wallId}_window-${windowIndex}`;
|
|
3306
|
-
const windowLabelNameAsMeshChild = `windowLabel-${windowIndex}`;
|
|
3307
3307
|
const polygonObjs = get3DXObjects().filter(p => p.type === 'POLYGON');
|
|
3308
3308
|
const targetObject = polygonObjs.find(obj => obj.object.object_data.uuid === partitionId);
|
|
3309
3309
|
const { component } = targetObject;
|
|
3310
|
-
const isVisible = visibilityBtn.classList.toggle('mdi-eye');
|
|
3310
|
+
const isVisible = fromParentVisibilityState !== undefined ? fromParentVisibilityState : visibilityBtn.classList.toggle('mdi-eye');
|
|
3311
3311
|
toggleVisibilityState(visibilityBtn, isVisible);
|
|
3312
3312
|
toggleMeshChildrenVisibility(component, windowNameAsMeshChild, isVisible);
|
|
3313
|
-
|
|
3313
|
+
// <START_COMMENT> TODO: 16032 - uncomment when polygon loader window visibility update is implemented
|
|
3314
|
+
// if(updateStateDB) {
|
|
3315
|
+
// const thisPartition : PartitionNode = _partitionNodes.flatMap(item => item.children || []).find(child => child.uuid === partitionId)
|
|
3316
|
+
// if(!thisPartition) {
|
|
3317
|
+
// log.warn('Partition not found')
|
|
3318
|
+
// } else {
|
|
3319
|
+
// const polygonJson = JSON.parse(thisPartition.polygon_json)
|
|
3320
|
+
// const wall = polygonJson.walls.find(item => item.uuid === wallId) || null
|
|
3321
|
+
// const windows = wall?.windows || null
|
|
3322
|
+
// windows?.forEach(w => w.options.is_visible = isVisible)
|
|
3323
|
+
// // const payload: PartitionPayload = {
|
|
3324
|
+
// // uuid: thisPartition.uuid,
|
|
3325
|
+
// // space_uuid: thisPartition.space_uuid,
|
|
3326
|
+
// // name: thisPartition.name,
|
|
3327
|
+
// // parent_uuid: thisPartition.parent_uuid,
|
|
3328
|
+
// // polygon_json: polygonJson
|
|
3329
|
+
// // }
|
|
3330
|
+
// // renderPolygon(payload)
|
|
3331
|
+
// setTimeout(() => {
|
|
3332
|
+
// const updatedPolygonJson = getCurrentPolygonData()
|
|
3333
|
+
// if(updatedPolygonJson) {
|
|
3334
|
+
// thisPartition.polygon_json = JSON.stringify(updatedPolygonJson);
|
|
3335
|
+
// }
|
|
3336
|
+
// // Dispatch event: PARTITION_EDITED
|
|
3337
|
+
// dispatchSpaceEvent(SPACE_EVENTS.PARTITION_EDITED, {
|
|
3338
|
+
// data: thisPartition,
|
|
3339
|
+
// isUpdateTree: false
|
|
3340
|
+
// });
|
|
3341
|
+
// }, 1000); // 1000ms = 1 second
|
|
3342
|
+
// }
|
|
3343
|
+
// }
|
|
3344
|
+
// <END_COMMENT> TODO: 16032 - uncomment when polygon loader window visibility update is implemented
|
|
3314
3345
|
}
|
|
3315
3346
|
catch (e) {
|
|
3316
3347
|
console.error("Error window visibility: ", e);
|
|
3317
3348
|
}
|
|
3318
3349
|
});
|
|
3319
3350
|
}
|
|
3351
|
+
function clearActivePane() {
|
|
3352
|
+
activePane = null;
|
|
3353
|
+
const paneElement = activePane;
|
|
3354
|
+
if (paneElement) {
|
|
3355
|
+
paneElement.style.display = 'none';
|
|
3356
|
+
}
|
|
3357
|
+
}
|
|
3320
3358
|
export {
|
|
3321
3359
|
//state
|
|
3322
3360
|
activeToolbarItem, activeActionItem, cancelModelPlacementPrompt, isCustomMapControlsVisible, pipeColor,
|
|
3323
3361
|
//methods
|
|
3324
3362
|
batchAddEventListenerById, batchAddEventListenerByClassName, batchAddEventListenerByClassNames, batchAddEventListenerByDataAttribute, setActiveToolbarItem, toggleDisplayPane, toggleActionBar, setupIndividualEventListeners, setupSpaceEventSubscriptions, handleModelVisibility, handleDeleteModel, handleShowMinimap, handleScrollToView, handleRenderMeetingUI, handleShowCustomMinimap,
|
|
3325
3363
|
// partition
|
|
3326
|
-
handlePartitionVisibility, handlePolygonVisibility, handleDeletePartition, handleWindowVisibility, };
|
|
3364
|
+
handlePartitionVisibility, handlePolygonVisibility, handleDeletePartition, handleWindowVisibility, clearActivePane };
|
package/package.json
CHANGED
package/static/atwinui.css
CHANGED
|
@@ -413,6 +413,19 @@
|
|
|
413
413
|
text-align: center;
|
|
414
414
|
}
|
|
415
415
|
|
|
416
|
+
/* Smaller version for inline use */
|
|
417
|
+
.at_button--small {
|
|
418
|
+
font-size: 0.8em;
|
|
419
|
+
padding: 2px 0.6em;
|
|
420
|
+
line-height: 1.2em;
|
|
421
|
+
max-height: 1.8em;
|
|
422
|
+
display: inline-flex;
|
|
423
|
+
align-items: center;
|
|
424
|
+
justify-content: center;
|
|
425
|
+
border-radius: 4px;
|
|
426
|
+
|
|
427
|
+
}
|
|
428
|
+
|
|
416
429
|
.at_button_icon {
|
|
417
430
|
padding: 2px 8px;
|
|
418
431
|
cursor: pointer;
|
|
@@ -2442,4 +2455,24 @@ li.at_partition_wall_row_item {
|
|
|
2442
2455
|
|
|
2443
2456
|
.at_wall_window_row_item.selected {
|
|
2444
2457
|
padding-left: 5px;
|
|
2458
|
+
}
|
|
2459
|
+
|
|
2460
|
+
.at_save_button {
|
|
2461
|
+
display: inline-flex;
|
|
2462
|
+
align-items: center;
|
|
2463
|
+
justify-content: center;
|
|
2464
|
+
cursor: pointer;
|
|
2465
|
+
height: 20px; /* match input height */
|
|
2466
|
+
padding: 0 6px; /* enough for 保存 */
|
|
2467
|
+
font-size: 10px;
|
|
2468
|
+
line-height: 1; /* prevent vertical text overflow */
|
|
2469
|
+
white-space: nowrap; /* keep 保存 on one line */
|
|
2470
|
+
color: white;
|
|
2471
|
+
border: 1px solid white;
|
|
2472
|
+
border-radius: 4px;
|
|
2473
|
+
background: none;
|
|
2474
|
+
font-family: Arial, sans-serif;
|
|
2475
|
+
transition: all 0.2s ease;
|
|
2476
|
+
margin-left: 4px;
|
|
2477
|
+
box-sizing: border-box;
|
|
2445
2478
|
}
|