architwin 1.16.3 → 1.16.5
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 +8 -1
- package/lib/architwin.js +1 -1
- package/lib/atwinui/components/toolbar/i18n.js +4 -2
- package/lib/atwinui/components/toolbar/spacePartition/roomFormPane.js +11 -4
- package/lib/atwinui/components/toolbar/spacePartition/roomTreePane.js +22 -19
- package/lib/atwinui/events.js +6 -3
- package/lib/loaders/polydrawerLoader.js +9 -2
- package/package.json +1 -1
|
@@ -278,7 +278,8 @@ i18n
|
|
|
278
278
|
"CannotBackDrawingMode": "Cannot go back while drawing mode is active.",
|
|
279
279
|
"PleaseOffDrawingMode": "Action cannot be done, please turn off drawing mode.",
|
|
280
280
|
"IotCategoryRequired": "IoT Category is required",
|
|
281
|
-
"SuccessUpdatedFloorLevel": "Updated the partition's floor level"
|
|
281
|
+
"SuccessUpdatedFloorLevel": "Updated the partition's floor level",
|
|
282
|
+
"DuplicatePartitionName": "This partition name is already used in this room. Please choose a different name."
|
|
282
283
|
}
|
|
283
284
|
},
|
|
284
285
|
ja: {
|
|
@@ -551,7 +552,8 @@ i18n
|
|
|
551
552
|
"PleaseOffDrawingMode": "操作を行う前に、描画モードをオフにしてください。",
|
|
552
553
|
"Successfully Deleted Tag": "タグを削除しました",
|
|
553
554
|
"IotCategoryRequired": "IoTカテゴリは必須です",
|
|
554
|
-
"SuccessUpdatedFloorLevel": "区画のフロアオフセット値が更新されました"
|
|
555
|
+
"SuccessUpdatedFloorLevel": "区画のフロアオフセット値が更新されました",
|
|
556
|
+
"DuplicatePartitionName": "このパーティション名は既にこの部屋で使用されています。別の名前を選択してください。"
|
|
555
557
|
}
|
|
556
558
|
}
|
|
557
559
|
},
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
import i18n from '../i18n';
|
|
11
11
|
import { SPACE_EVENTS } from "../../../../types";
|
|
12
|
-
import { batchAddEventListenerByClassName } from "../../../events";
|
|
12
|
+
import { batchAddEventListenerByClassName, notyf } from "../../../events";
|
|
13
13
|
import { startDraw, cancelDraw, disposeModel, _3DXObjects, getCurrentPolygon, dispatchSpaceEvent, enableVerticeControls, setCurrentPolygon, setMeshChildrenMaterialProperty, get3DXObjects, getChildrenOfModel, clearSelectedObject, renderPolygon, setWallBaseHeight, clearWallBaseHeight, setDrawingConfig, resetDrawingConfig, goToPosition, partitionHistory } from '../../../../architwin';
|
|
14
14
|
import { generateUUID, extractUUID } from '../../../../utils';
|
|
15
15
|
import { getCurrentEditRoomData } from './roomTreePane';
|
|
@@ -437,9 +437,16 @@ function displayPartitions(partitions) {
|
|
|
437
437
|
confirmEditPartitionName.style.display = 'none';
|
|
438
438
|
if (newPartitionName) {
|
|
439
439
|
// Update the name of the partition in the array
|
|
440
|
-
const
|
|
441
|
-
|
|
442
|
-
|
|
440
|
+
const roomChildren = currentEditRoomData.children;
|
|
441
|
+
const nameFound = roomChildren.find(child => child.name === newPartitionName && child.uuid != currentPartitionData.uuid);
|
|
442
|
+
if (nameFound != undefined) {
|
|
443
|
+
notyf.error(`${i18n.t('DuplicatePartitionName')}`);
|
|
444
|
+
}
|
|
445
|
+
else {
|
|
446
|
+
const partitionIndex = currentPartitionDataArray.findIndex(partition => partition.uuid === currentPartitionData.uuid);
|
|
447
|
+
if (partitionIndex !== -1) {
|
|
448
|
+
currentPartitionDataArray[partitionIndex].name = newPartitionName;
|
|
449
|
+
}
|
|
443
450
|
}
|
|
444
451
|
}
|
|
445
452
|
else {
|
|
@@ -352,27 +352,30 @@ function toggleSelectedPartition() {
|
|
|
352
352
|
}));
|
|
353
353
|
batchAddEventListenerByClassName('at_child_visible_btn', (event) => __awaiter(this, void 0, void 0, function* () {
|
|
354
354
|
var _a;
|
|
355
|
-
const
|
|
356
|
-
const li =
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
355
|
+
const btn = event.target;
|
|
356
|
+
const li = btn.closest('li');
|
|
357
|
+
const isWindow = (_a = li === null || li === void 0 ? void 0 : li.id) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes('window');
|
|
358
|
+
const polygonId = btn.id;
|
|
359
|
+
const wallId = btn.getAttribute('polygon-item-id');
|
|
360
|
+
event.stopPropagation();
|
|
361
|
+
if (isWindow) {
|
|
362
|
+
handleWindowVisibility(btn, true);
|
|
363
|
+
return;
|
|
360
364
|
}
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
});
|
|
365
|
+
const parentVisibleState = yield handlePolygonVisibility(polygonId);
|
|
366
|
+
// no DOM reads after this point that depend on btn/li meaning
|
|
367
|
+
yield new Promise(resolve => {
|
|
368
|
+
requestAnimationFrame(() => resolve());
|
|
369
|
+
});
|
|
370
|
+
if (!wallId)
|
|
371
|
+
return;
|
|
372
|
+
const windowItems = document.querySelectorAll(`li.at_window_row_item[wall-id="${wallId}"]`);
|
|
373
|
+
windowItems.forEach((windowLi) => {
|
|
374
|
+
const visibilityBtn = windowLi.querySelector('.at_child_visible_btn');
|
|
375
|
+
if (visibilityBtn) {
|
|
376
|
+
handleWindowVisibility(visibilityBtn, false, parentVisibleState);
|
|
374
377
|
}
|
|
375
|
-
}
|
|
378
|
+
});
|
|
376
379
|
}));
|
|
377
380
|
batchAddEventListenerByClassName('at_partition_wall_row_item', (event) => __awaiter(this, void 0, void 0, function* () {
|
|
378
381
|
event.stopPropagation();
|
package/lib/atwinui/events.js
CHANGED
|
@@ -8,7 +8,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
});
|
|
9
9
|
};
|
|
10
10
|
import { actionBar, renderObjectCards, renderLibraryCards, renderTags, renderTagRow, getTagFormData, addClickEventToTagRow, setActiveCard, setActiveMenu, removeObjectCard, clearActiveMenu, setTagCategoriesOption, toggleDropdown, tagFormMode, selectedTag, renderRecepientOptions, renderTagMessages, createTagMessage, setTagLink, setTagMessagingDetails, renderCategoryDropdownOptions, clearTagFormDropdown, clearActiveActionBtn, clearActiveCard, toggleActionBarButtons, selectedCategoryFilterId, selectedSubCategoryFilterId, filterTagList, toggleModal, setModalAction, } from "./components/toolbar";
|
|
11
|
-
import { getTargetPosition, addMediaScreen, _3DXObjects, selectedObject, setTransformControls, copyObject, revertTransform, clearSelectedObject, removeTransformControls, getLibrary, getMpTags, renderTag, captureSpaceScreenshot, moveTag, subscribeSpaceEvent, setModelVisibility, disposeModel, disposeTag, _tags, _tagCategories, dispatchSpaceEvent, editTagLabel, editTagDescription, setTagMessageRecepients, setTagMessages, setSelectedTagUuid, renderMeetingSidebar, setTagIcon, setObjectTransformation, getSelectedObject, _atwin, isCdnMapDataAvailable, captureScreenshotAndCameraDetails, _mpConfig, cancelModelPlacement, _modelDetails, actionHistory, get3DXObjects, transformHistory, goToModel, themeManager, _partitionNodes, setSpacePartitionNodes, getSpaceId, setFloorBaseHeight, toggleWallVisibility, getChildrenOfModel, toggleFloorVisibility, renderPolygon, getCurrentPolygon, getFloorBaseHeight, setSelectedObject, redoDrawAction, undoDrawAction, setWallBaseHeight, clearWallBaseHeight, clearFloorBaseHeight, isToolbarFeatureEnabled, captureCurrentView, getCurrentFloor, _spaceUsers, setPipeCategories, setPipes, detachTagMedia, getTagDataCollection, setVertexPath, _screenSharingHostUser, toggleVisibilityTag, _tagIotCategoryTypes, getIoTDeviceTagIcons, toggleMeshChildrenVisibility, set3DXObjects, partitionHistory, _thisVertexPath,
|
|
11
|
+
import { getTargetPosition, addMediaScreen, _3DXObjects, selectedObject, setTransformControls, copyObject, revertTransform, clearSelectedObject, removeTransformControls, getLibrary, getMpTags, renderTag, captureSpaceScreenshot, moveTag, subscribeSpaceEvent, setModelVisibility, disposeModel, disposeTag, _tags, _tagCategories, dispatchSpaceEvent, editTagLabel, editTagDescription, setTagMessageRecepients, setTagMessages, setSelectedTagUuid, renderMeetingSidebar, setTagIcon, setObjectTransformation, getSelectedObject, _atwin, isCdnMapDataAvailable, captureScreenshotAndCameraDetails, _mpConfig, cancelModelPlacement, _modelDetails, actionHistory, get3DXObjects, transformHistory, goToModel, themeManager, _partitionNodes, setSpacePartitionNodes, getSpaceId, setFloorBaseHeight, toggleWallVisibility, getChildrenOfModel, toggleFloorVisibility, renderPolygon, getCurrentPolygon, getFloorBaseHeight, setSelectedObject, redoDrawAction, undoDrawAction, setWallBaseHeight, clearWallBaseHeight, clearFloorBaseHeight, isToolbarFeatureEnabled, captureCurrentView, getCurrentFloor, _spaceUsers, setPipeCategories, setPipes, detachTagMedia, getTagDataCollection, setVertexPath, _screenSharingHostUser, toggleVisibilityTag, _tagIotCategoryTypes, getIoTDeviceTagIcons, toggleMeshChildrenVisibility, set3DXObjects, partitionHistory, _thisVertexPath, setPolygonPath,
|
|
12
12
|
// polygonHistory
|
|
13
13
|
} from "../architwin";
|
|
14
14
|
import { Notyf } from 'notyf';
|
|
@@ -2303,7 +2303,9 @@ function handleCancelPartition() {
|
|
|
2303
2303
|
if (!roomNode.children)
|
|
2304
2304
|
return roomNode;
|
|
2305
2305
|
return Object.assign(Object.assign({}, roomNode), { children: roomNode.children.filter((child) => child.uuid !== partition.uuid) });
|
|
2306
|
-
})
|
|
2306
|
+
});
|
|
2307
|
+
// Commented this out to fix disappearing issue of existing empty room #16173
|
|
2308
|
+
// .filter((roomNode) => !roomNode.children || roomNode.children.length > 0);
|
|
2307
2309
|
log.info("filteredRoomNodes", filteredRoomNodes);
|
|
2308
2310
|
// set node to update room tree
|
|
2309
2311
|
yield setSpacePartitionNodes(filteredRoomNodes);
|
|
@@ -2353,6 +2355,7 @@ function handleCancelPartition() {
|
|
|
2353
2355
|
return point;
|
|
2354
2356
|
});
|
|
2355
2357
|
log.info("polyJson with lastFloorLevel", polyJson);
|
|
2358
|
+
setPolygonPath(obj.object.id, polyJson.path);
|
|
2356
2359
|
}
|
|
2357
2360
|
const payload = {
|
|
2358
2361
|
uuid: currentPartition.uuid,
|
|
@@ -2635,7 +2638,7 @@ function handleMarkFloor() {
|
|
|
2635
2638
|
return path;
|
|
2636
2639
|
});
|
|
2637
2640
|
renderPolygon(updatedPath);
|
|
2638
|
-
notyf.success(
|
|
2641
|
+
notyf.success(`${i18n.t('SuccessUpdatedFloorLevel')}`);
|
|
2639
2642
|
}
|
|
2640
2643
|
else {
|
|
2641
2644
|
log.warn("No matching uuid for the polygon");
|
|
@@ -774,7 +774,9 @@ export class BufferGeometry {
|
|
|
774
774
|
}, []);
|
|
775
775
|
//this.renderWindows(windowsPolyData)
|
|
776
776
|
for (let i = 0; i < polyData.walls.length; i++) {
|
|
777
|
-
|
|
777
|
+
if (!walls[i].options.is_deleted) {
|
|
778
|
+
this.renderWindows(polyData.walls[i].windows);
|
|
779
|
+
}
|
|
778
780
|
}
|
|
779
781
|
}
|
|
780
782
|
}
|
|
@@ -1052,7 +1054,12 @@ export class BufferGeometry {
|
|
|
1052
1054
|
const wallCanvas = this.createLabelCanvas(`${i18n.t('Wall')} ${i + 1}${wallMaterial ? '_' + wallMaterial : ' (' + i18n.t('Area') + ')'}: ${wallArea.toFixed(2)}m²`);
|
|
1053
1055
|
// const wallCanvas = this.createLabelCanvas(`${i18n.t('Wall')} ${i+1}_Wood: ${wallArea.toFixed(2)}m²`)
|
|
1054
1056
|
// Create floor edge label
|
|
1055
|
-
|
|
1057
|
+
let floorCanvas;
|
|
1058
|
+
if (metadata === null || metadata === void 0 ? void 0 : metadata.walls) {
|
|
1059
|
+
if (!metadata.walls[i].options.is_deleted) {
|
|
1060
|
+
floorCanvas = this.createLabelCanvas(`${i18n.t('Wall')} ${i + 1} (${i18n.t('Edge')}): ${wallLength.toFixed(2)}m`);
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1056
1063
|
const midPoint = {
|
|
1057
1064
|
x: (startPoint.x + endPoint.x) / 2,
|
|
1058
1065
|
y: (startPoint.y + endPoint.y) / 2,
|