architwin 1.14.13 → 1.14.14
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 +6 -2
- package/lib/atwinui/components/toolbar/spacePartition/roomFormPane.js +83 -20
- package/lib/atwinui/components/toolbar/spacePartition/roomTreePane.d.ts +9 -1
- package/lib/atwinui/components/toolbar/spacePartition/roomTreePane.js +219 -57
- package/lib/atwinui/events.d.ts +2 -1
- package/lib/atwinui/events.js +53 -8
- package/lib/loaders/polydrawerLoader.d.ts +3 -0
- package/lib/loaders/polydrawerLoader.js +26 -22
- package/lib/types.d.ts +5 -0
- package/package.json +1 -1
- package/static/atwinui.css +41 -8
- package/static/utility.css +1 -1
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 } from "../architwin";
|
|
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, toggleMeshChildrenVisibility } from "../architwin";
|
|
12
12
|
import { Notyf } from 'notyf';
|
|
13
13
|
import 'notyf/notyf.min.css';
|
|
14
14
|
import { SPACE_EVENTS, COORDINATE_SYSTEM, UNITS, DEGREE, MAP_OPTIONS, sortTagOptions, sortObjectOptions, CUSTOM_MAP_MODE } from "../types";
|
|
@@ -23,7 +23,7 @@ import { isValidUrl, debounce, isElementVisible, extractUUID, showLoader, isVec3
|
|
|
23
23
|
import log from 'loglevel';
|
|
24
24
|
import * as minimap from '../minimap';
|
|
25
25
|
import { clearActiveThemeCard, getSelectedTheme } from "./components/toolbar/themePane";
|
|
26
|
-
import { getCurrentEditRoomData, displayRoomTree, updatePartitionVisibilityUI, getSelectedPartitionId, updatePolygonVisibilityData, toggleVisibilityState, setFilteredDisplay, updateRoomVisibilityUI, highlightSelectedPartitionChild } from "./components/toolbar/spacePartition/roomTreePane";
|
|
26
|
+
import { getCurrentEditRoomData, displayRoomTree, updatePartitionVisibilityUI, getSelectedPartitionId, updatePolygonVisibilityData, toggleVisibilityState, setFilteredDisplay, updateRoomVisibilityUI, highlightSelectedPartitionChild, highlightSelectedWallWindow } from "./components/toolbar/spacePartition/roomTreePane";
|
|
27
27
|
import { toggleDrawPartitionButton, displayPartitionFormMode, setPartitionFormMode, clearPartitionForm, setPolygonData, getPartitionFormData, getPartitionSavingMode, setPartitionSavingMode, getPartitionFormMode, getNewlyAddedPartition, setCurrentPartitionData, getCurrentPartitionData, getTempCurrentPolygon, clearTempCurrentPolygon, toggleDrawWindowButton, getDrawingMode } from "./components/toolbar/spacePartition/roomFormPane";
|
|
28
28
|
import { actionSettingsSelectOption, getTempCoordinateSystem, getTempMeasurementUnit, getTempRotationUnit, setCoordinateSystem, setMeasurementUnit, setRotationUnit, initSettingsValues, setTempCoordinateSystem, setTempMeasurementUnit, setTempRotationUnit, toggleActionSettingsDropdown, toggleCalibrateBasepoint, setScaleFactor, getTempScaleFactor, setTempScaleFactor, setBasepoint, getTempBasepoint, setTempBasepoint, getBasepoint, toggleActionSettings, getBasepointObjectPayload, displayConvertedCoordinates, getCoordinateSystem, getScaleFactor, getMeasurementUnit, getRotationUnit, setBasepointObjectPayload } from "./components/toolbar/actionSettingsPane";
|
|
29
29
|
import { getBasepointCalibrateBpCoordinateValues, getBasepointCalibrateMpCoordinateValues, initBsepointCalibratePane, toggleBasepointCalibratePane } from "./components/toolbar/basepointCalibratePane";
|
|
@@ -1443,14 +1443,21 @@ function setupSpaceEventSubscriptions() {
|
|
|
1443
1443
|
}
|
|
1444
1444
|
function handlePartitionColiderClickSelected(payload) {
|
|
1445
1445
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1446
|
-
const
|
|
1446
|
+
const polygonId = extractUUID(payload.collider.name);
|
|
1447
|
+
const polygonName = payload.collider.name.toLowerCase();
|
|
1447
1448
|
if ((activePane === null || activePane === void 0 ? void 0 : activePane.getAttribute('id')) !== 'at-room-tree-pane') {
|
|
1448
1449
|
yield toggleDisplayPane('at-room-creation-btn');
|
|
1449
1450
|
}
|
|
1450
1451
|
else {
|
|
1451
1452
|
yield new Promise(resolve => requestAnimationFrame(resolve));
|
|
1452
1453
|
}
|
|
1453
|
-
|
|
1454
|
+
if (polygonName.includes('window')) {
|
|
1455
|
+
const index = polygonName.split('_')[1].split('-')[1];
|
|
1456
|
+
highlightSelectedWallWindow(polygonId, index);
|
|
1457
|
+
}
|
|
1458
|
+
if (polygonName.includes('wall') || polygonName.includes('floor')) {
|
|
1459
|
+
highlightSelectedPartitionChild(polygonId, payload.collider.name);
|
|
1460
|
+
}
|
|
1454
1461
|
});
|
|
1455
1462
|
}
|
|
1456
1463
|
function handleDragEnd(payload) {
|
|
@@ -2140,9 +2147,9 @@ function handleDeletePartition(targetId) {
|
|
|
2140
2147
|
function handleCancelPartition() {
|
|
2141
2148
|
const cancelRoomBtn = document.getElementById('at-cancel-room-form-btn');
|
|
2142
2149
|
cancelRoomBtn.addEventListener('click', () => {
|
|
2143
|
-
getNewlyAddedPartition().map(partition => {
|
|
2150
|
+
getNewlyAddedPartition().map((partition) => __awaiter(this, void 0, void 0, function* () {
|
|
2144
2151
|
const target = _3DXObjects.find(obj => obj.object.object_data.uuid === partition.uuid);
|
|
2145
|
-
disposeModel(target);
|
|
2152
|
+
yield disposeModel(target);
|
|
2146
2153
|
dispatchSpaceEvent(SPACE_EVENTS.PARTITION_DISPOSED, partition);
|
|
2147
2154
|
const filteredRoomNodes = _partitionNodes.map((roomNode) => {
|
|
2148
2155
|
// Filter children based on partitionUuid if children exist
|
|
@@ -2151,7 +2158,7 @@ function handleCancelPartition() {
|
|
|
2151
2158
|
}
|
|
2152
2159
|
});
|
|
2153
2160
|
setSpacePartitionNodes(filteredRoomNodes);
|
|
2154
|
-
});
|
|
2161
|
+
}));
|
|
2155
2162
|
clearWallBaseHeight();
|
|
2156
2163
|
const objects = get3DXObjects();
|
|
2157
2164
|
const currentPartitionData = getCurrentEditRoomData();
|
|
@@ -2167,6 +2174,23 @@ function handleCancelPartition() {
|
|
|
2167
2174
|
if (currentPartitionData) {
|
|
2168
2175
|
const currentPartition = currentPartitionData.children.find(child => child.uuid == target.object.object_data.uuid);
|
|
2169
2176
|
const polyJson = typeof currentPartition.polygon_json === 'string' ? JSON.parse(currentPartition.polygon_json) : currentPartition.polygon_json;
|
|
2177
|
+
log.info("JAMES polyJson", polyJson);
|
|
2178
|
+
// delete newly added windows
|
|
2179
|
+
_3DXObjects.map(object => {
|
|
2180
|
+
if (object.children) {
|
|
2181
|
+
object.children.map((win) => __awaiter(this, void 0, void 0, function* () {
|
|
2182
|
+
log.info("JAMES window", win);
|
|
2183
|
+
yield disposeModel(win);
|
|
2184
|
+
// Find the wall that owns this window
|
|
2185
|
+
const wall = polyJson.walls.find(wall => wall.uuid === win.wallUUID);
|
|
2186
|
+
if (wall && wall.windows) {
|
|
2187
|
+
// Remove this specific window (by its index) from that wall
|
|
2188
|
+
wall.windows = wall.windows.filter(w => w.index !== win.index);
|
|
2189
|
+
log.info(`Removed window ${win.index} from wall ${wall.uuid}`);
|
|
2190
|
+
}
|
|
2191
|
+
}));
|
|
2192
|
+
}
|
|
2193
|
+
});
|
|
2170
2194
|
if (polyJson && polyJson.path) {
|
|
2171
2195
|
const payload = {
|
|
2172
2196
|
uuid: target.object.object_data.uuid,
|
|
@@ -3272,10 +3296,31 @@ function handleClickEventInObjectSortOption() {
|
|
|
3272
3296
|
});
|
|
3273
3297
|
}
|
|
3274
3298
|
}
|
|
3299
|
+
function handleWindowVisibility(visibilityBtn) {
|
|
3300
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3301
|
+
try {
|
|
3302
|
+
const partitionId = visibilityBtn.getAttribute('partition-id');
|
|
3303
|
+
const windowIndex = visibilityBtn.closest('li').getAttribute('window-index');
|
|
3304
|
+
const wallId = visibilityBtn.closest('li').getAttribute('wall-id');
|
|
3305
|
+
const windowNameAsMeshChild = `${wallId}_window-${windowIndex}`;
|
|
3306
|
+
const windowLabelNameAsMeshChild = `windowLabel-${windowIndex}`;
|
|
3307
|
+
const polygonObjs = get3DXObjects().filter(p => p.type === 'POLYGON');
|
|
3308
|
+
const targetObject = polygonObjs.find(obj => obj.object.object_data.uuid === partitionId);
|
|
3309
|
+
const { component } = targetObject;
|
|
3310
|
+
const isVisible = visibilityBtn.classList.toggle('mdi-eye');
|
|
3311
|
+
toggleVisibilityState(visibilityBtn, isVisible);
|
|
3312
|
+
toggleMeshChildrenVisibility(component, windowNameAsMeshChild, isVisible);
|
|
3313
|
+
toggleMeshChildrenVisibility(component, windowLabelNameAsMeshChild, isVisible);
|
|
3314
|
+
}
|
|
3315
|
+
catch (e) {
|
|
3316
|
+
console.error("Error window visibility: ", e);
|
|
3317
|
+
}
|
|
3318
|
+
});
|
|
3319
|
+
}
|
|
3275
3320
|
export {
|
|
3276
3321
|
//state
|
|
3277
3322
|
activeToolbarItem, activeActionItem, cancelModelPlacementPrompt, isCustomMapControlsVisible, pipeColor,
|
|
3278
3323
|
//methods
|
|
3279
3324
|
batchAddEventListenerById, batchAddEventListenerByClassName, batchAddEventListenerByClassNames, batchAddEventListenerByDataAttribute, setActiveToolbarItem, toggleDisplayPane, toggleActionBar, setupIndividualEventListeners, setupSpaceEventSubscriptions, handleModelVisibility, handleDeleteModel, handleShowMinimap, handleScrollToView, handleRenderMeetingUI, handleShowCustomMinimap,
|
|
3280
3325
|
// partition
|
|
3281
|
-
handlePartitionVisibility, handlePolygonVisibility, handleDeletePartition, };
|
|
3326
|
+
handlePartitionVisibility, handlePolygonVisibility, handleDeletePartition, handleWindowVisibility, };
|
|
@@ -44,6 +44,8 @@ export declare class TubeLine {
|
|
|
44
44
|
polygonData: any;
|
|
45
45
|
renderPolygonOnAdd: boolean;
|
|
46
46
|
targetUUID: any;
|
|
47
|
+
isWindowEditing: boolean;
|
|
48
|
+
objectIndex: any;
|
|
47
49
|
};
|
|
48
50
|
outputs: Record<string, unknown> & MpSdk.Scene.PredefinedOutputs;
|
|
49
51
|
context: MpSdk.Scene.IComponentContext;
|
|
@@ -139,6 +141,7 @@ export declare class BufferGeometry {
|
|
|
139
141
|
targetUUID: any;
|
|
140
142
|
deductWindowFromWallArea: boolean;
|
|
141
143
|
windowOutlineColor: number;
|
|
144
|
+
isWindowEditing: boolean;
|
|
142
145
|
};
|
|
143
146
|
outputs: Record<string, unknown> & MpSdk.Scene.PredefinedOutputs;
|
|
144
147
|
context: MpSdk.Scene.IComponentContext;
|
|
@@ -40,6 +40,8 @@ export class TubeLine {
|
|
|
40
40
|
polygonData: undefined,
|
|
41
41
|
renderPolygonOnAdd: true,
|
|
42
42
|
targetUUID: undefined,
|
|
43
|
+
isWindowEditing: false,
|
|
44
|
+
objectIndex: undefined
|
|
43
45
|
};
|
|
44
46
|
//@ts-expect-error
|
|
45
47
|
this.outputs = {
|
|
@@ -87,7 +89,9 @@ export class TubeLine {
|
|
|
87
89
|
drawingMode: this.inputs.drawingMode,
|
|
88
90
|
targetIndex: this.inputs.targetIndex,
|
|
89
91
|
polygonData: this.inputs.polygonData,
|
|
90
|
-
targetUUID: this.inputs.targetUUID
|
|
92
|
+
targetUUID: this.inputs.targetUUID,
|
|
93
|
+
isWindowEditing: this.inputs.isWindowEditing,
|
|
94
|
+
objectIndex: this.inputs.objectIndex,
|
|
91
95
|
};
|
|
92
96
|
renderPolygon(this.inputs.path, options);
|
|
93
97
|
}
|
|
@@ -496,8 +500,7 @@ export class BufferGeometry {
|
|
|
496
500
|
floorName: '',
|
|
497
501
|
floorColor: 0x0000ff,
|
|
498
502
|
wallColor: 0xffd150,
|
|
499
|
-
|
|
500
|
-
windowColor: 0xC09672,
|
|
503
|
+
windowColor: 0x275c8b,
|
|
501
504
|
floorOpacity: 0.3,
|
|
502
505
|
wallOpacity: 0.6,
|
|
503
506
|
visible: true,
|
|
@@ -512,7 +515,8 @@ export class BufferGeometry {
|
|
|
512
515
|
targetIndex: undefined,
|
|
513
516
|
targetUUID: undefined,
|
|
514
517
|
deductWindowFromWallArea: true,
|
|
515
|
-
windowOutlineColor:
|
|
518
|
+
windowOutlineColor: 0x65BBE9,
|
|
519
|
+
isWindowEditing: false
|
|
516
520
|
};
|
|
517
521
|
this.emits = {
|
|
518
522
|
changed: true,
|
|
@@ -694,22 +698,17 @@ export class BufferGeometry {
|
|
|
694
698
|
const windowsPolyData = polyData.walls.reduce((acc, wall, index) => {
|
|
695
699
|
if (wall.windows && wall.windows.length > 0) {
|
|
696
700
|
acc = [...acc, ...wall.windows];
|
|
697
|
-
wallDataArray[index].windows = wall.windows
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
// if (wall.windows && wall.windows.length > 0) {
|
|
702
|
-
// totalWindowArea = wall.windows.reduce((sum, window) => {
|
|
703
|
-
// return sum + (window.area || 0);
|
|
704
|
-
// }, 0);
|
|
705
|
-
// }
|
|
706
|
-
// // Subtract window area from wall area
|
|
707
|
-
// wallDataArray[index].area = Math.max(0, wallDataArray[index].area - totalWindowArea);
|
|
708
|
-
// }
|
|
701
|
+
wallDataArray[index].windows = wall.windows.map(window => {
|
|
702
|
+
window.wall_uuid = wall.uuid;
|
|
703
|
+
return window;
|
|
704
|
+
});
|
|
709
705
|
}
|
|
710
706
|
return acc;
|
|
711
707
|
}, []);
|
|
712
|
-
this.renderWindows(windowsPolyData)
|
|
708
|
+
//this.renderWindows(windowsPolyData)
|
|
709
|
+
for (let i = 0; i < polyData.walls.length; i++) {
|
|
710
|
+
this.renderWindows(polyData.walls[i].windows);
|
|
711
|
+
}
|
|
713
712
|
}
|
|
714
713
|
}
|
|
715
714
|
catch (error) {
|
|
@@ -755,7 +754,7 @@ export class BufferGeometry {
|
|
|
755
754
|
};
|
|
756
755
|
windowDataArray.push(windowEdges);
|
|
757
756
|
}
|
|
758
|
-
let windowName =
|
|
757
|
+
let windowName = `Window ${this.inputs.targetIndex + 1}`;
|
|
759
758
|
let windowMaterial = undefined;
|
|
760
759
|
if (polyData.walls[targetWallIndex] && polyData.walls[targetWallIndex].windows[this.inputs.targetIndex]) {
|
|
761
760
|
const currWindow = polyData.walls[targetWallIndex].windows[this.inputs.targetIndex];
|
|
@@ -768,6 +767,7 @@ export class BufferGeometry {
|
|
|
768
767
|
path: this.inputs.path,
|
|
769
768
|
name: windowName,
|
|
770
769
|
index: this.inputs.targetIndex,
|
|
770
|
+
wall_uuid: this.inputs.targetUUID,
|
|
771
771
|
options: {
|
|
772
772
|
color: this.inputs.windowColor,
|
|
773
773
|
is_visible: true,
|
|
@@ -792,7 +792,7 @@ export class BufferGeometry {
|
|
|
792
792
|
return sum + (window.area || 0);
|
|
793
793
|
}, 0);
|
|
794
794
|
}
|
|
795
|
-
polyData.walls[targetWallIndex].
|
|
795
|
+
polyData.walls[targetWallIndex].netArea = Math.max(0, polyData.walls[targetWallIndex].area - totalWindowArea);
|
|
796
796
|
}
|
|
797
797
|
partitionData = polyData;
|
|
798
798
|
}
|
|
@@ -965,6 +965,7 @@ export class BufferGeometry {
|
|
|
965
965
|
wallMesh.name = this.inputs.uuid != '' ? `${this.inputs.uuid}_wall-${i}` : `wall-${i}`;
|
|
966
966
|
const wallLength = new THREE.Vector3(endPoint.x - startPoint.x, endPoint.y - startPoint.y, endPoint.z - startPoint.z).length();
|
|
967
967
|
let wallArea = wallLength * WALL_HEIGHT;
|
|
968
|
+
let netWallArea = wallArea;
|
|
968
969
|
if (this.inputs.deductWindowFromWallArea && metadata) {
|
|
969
970
|
const currentWallIndex = wallDataArray.length == 0 ? wallDataArray.length : wallDataArray.length - 1;
|
|
970
971
|
let totalWindowArea = 0;
|
|
@@ -975,7 +976,7 @@ export class BufferGeometry {
|
|
|
975
976
|
}, 0);
|
|
976
977
|
}
|
|
977
978
|
// Subtract window area from wall area
|
|
978
|
-
|
|
979
|
+
netWallArea = Math.max(0, wallArea - totalWindowArea);
|
|
979
980
|
}
|
|
980
981
|
// Create wall label
|
|
981
982
|
let wallMaterial;
|
|
@@ -1083,6 +1084,7 @@ export class BufferGeometry {
|
|
|
1083
1084
|
},
|
|
1084
1085
|
index: i,
|
|
1085
1086
|
area: wallArea,
|
|
1087
|
+
netArea: netWallArea,
|
|
1086
1088
|
width: wallDimensions.width,
|
|
1087
1089
|
perimeter: wallDimensions.perimeter,
|
|
1088
1090
|
wall_height: WALL_HEIGHT,
|
|
@@ -1151,10 +1153,11 @@ export class BufferGeometry {
|
|
|
1151
1153
|
transparent: true,
|
|
1152
1154
|
depthWrite: false
|
|
1153
1155
|
}));
|
|
1154
|
-
windowMesh.name = windows[i].
|
|
1156
|
+
windowMesh.name = windows[i].wall_uuid ? `${windows[i].wall_uuid}_window-${i}` : `window-${i}`;
|
|
1155
1157
|
const outlineGeometry = new THREE.EdgesGeometry(windowGeometry);
|
|
1156
1158
|
const outlineMaterial = new THREE.LineBasicMaterial({ color: this.inputs.windowOutlineColor, linewidth: 3 });
|
|
1157
1159
|
const outlineMesh = new THREE.LineSegments(outlineGeometry, outlineMaterial);
|
|
1160
|
+
outlineMesh.name = windowMesh.name;
|
|
1158
1161
|
windowMesh.add(outlineMesh);
|
|
1159
1162
|
// Add window center label if material is defined
|
|
1160
1163
|
if (windows[i].material || windows[i].name) {
|
|
@@ -1205,8 +1208,9 @@ export class BufferGeometry {
|
|
|
1205
1208
|
.add(p0);
|
|
1206
1209
|
const labelOffset = 0.01;
|
|
1207
1210
|
windowCenterLabel.position.copy(center3D).addScaledVector(normal.clone().negate(), labelOffset);
|
|
1211
|
+
windowCenterLabel.name = windowMesh.name;
|
|
1208
1212
|
windowCenterLabel.lookAt(windowCenterLabel.position.clone().add(normal.clone().negate()));
|
|
1209
|
-
windowCenterLabel.name = windows[i].uuid ? `${windows[i].uuid}_windowLabel` : `windowLabel-${i}`;
|
|
1213
|
+
//windowCenterLabel.name = windows[i].uuid ? `${windows[i].uuid}_windowLabel` : `windowLabel-${i}`;
|
|
1210
1214
|
this.groupedMesh.add(windowCenterLabel);
|
|
1211
1215
|
}
|
|
1212
1216
|
catch (e) {
|
package/lib/types.d.ts
CHANGED
|
@@ -266,6 +266,7 @@ export interface IObjectData {
|
|
|
266
266
|
node?: Scene.INode;
|
|
267
267
|
type?: string;
|
|
268
268
|
index?: number;
|
|
269
|
+
wallUUID?: string;
|
|
269
270
|
}[];
|
|
270
271
|
}
|
|
271
272
|
export interface IObjectFilters {
|
|
@@ -462,6 +463,8 @@ export interface ComponentOptions {
|
|
|
462
463
|
targetIndex?: number | undefined;
|
|
463
464
|
targetUUID?: string | undefined;
|
|
464
465
|
deductWindowFromWallArea?: boolean | undefined;
|
|
466
|
+
isWindowEditing?: boolean | undefined;
|
|
467
|
+
objectIndex?: number | undefined;
|
|
465
468
|
}
|
|
466
469
|
export interface VectorCoords {
|
|
467
470
|
object_position: Vector3;
|
|
@@ -1110,6 +1113,7 @@ export interface WallPolyData {
|
|
|
1110
1113
|
};
|
|
1111
1114
|
material?: string | undefined;
|
|
1112
1115
|
area: number;
|
|
1116
|
+
netArea?: number | undefined;
|
|
1113
1117
|
perimeter: number | undefined;
|
|
1114
1118
|
width: number | undefined;
|
|
1115
1119
|
wall_height: number;
|
|
@@ -1119,6 +1123,7 @@ export interface WallPolyData {
|
|
|
1119
1123
|
export interface WindowPolyData {
|
|
1120
1124
|
path: Array<Vector3>;
|
|
1121
1125
|
uuid?: string | undefined;
|
|
1126
|
+
wall_uuid?: string | undefined;
|
|
1122
1127
|
name?: string | undefined;
|
|
1123
1128
|
index?: number | undefined;
|
|
1124
1129
|
options?: {
|
package/package.json
CHANGED
package/static/atwinui.css
CHANGED
|
@@ -1460,11 +1460,6 @@
|
|
|
1460
1460
|
padding: 10px 10px 5px 10px !important;
|
|
1461
1461
|
}
|
|
1462
1462
|
|
|
1463
|
-
.at_disabled {
|
|
1464
|
-
pointer-events: none;
|
|
1465
|
-
opacity: 0.4;
|
|
1466
|
-
}
|
|
1467
|
-
|
|
1468
1463
|
/* Basic styling for the tree */
|
|
1469
1464
|
/* .at_tree {
|
|
1470
1465
|
list-style-type: none;
|
|
@@ -1545,7 +1540,7 @@
|
|
|
1545
1540
|
|
|
1546
1541
|
.at_room_tree_child li {
|
|
1547
1542
|
margin: 5px 0;
|
|
1548
|
-
|
|
1543
|
+
margin-left: 30px;
|
|
1549
1544
|
padding-right: 5px;
|
|
1550
1545
|
display: flex;
|
|
1551
1546
|
justify-content: space-between;
|
|
@@ -2295,10 +2290,16 @@ dialog#at-screen-share-request-modal::backdrop {
|
|
|
2295
2290
|
}
|
|
2296
2291
|
|
|
2297
2292
|
.at_dropdown_item .at_subitem_right {
|
|
2298
|
-
cursor:
|
|
2293
|
+
cursor: default;
|
|
2299
2294
|
display: flex;
|
|
2300
2295
|
}
|
|
2301
2296
|
|
|
2297
|
+
.at_dropdown_item .at_subitem_right .mdi-check,
|
|
2298
|
+
.at_dropdown_item .at_subitem_right .mdi-pencil,
|
|
2299
|
+
.at_dropdown_item .at_subitem_right .mdi-delete-outline {
|
|
2300
|
+
cursor: pointer;
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2302
2303
|
.at_dropdown_item .at_subitem_right span:hover{
|
|
2303
2304
|
color: var(--bg-accent-azusa)
|
|
2304
2305
|
}
|
|
@@ -2405,8 +2406,40 @@ dialog#at-screen-share-request-modal::backdrop {
|
|
|
2405
2406
|
|
|
2406
2407
|
.at_partition_wall_row_item {
|
|
2407
2408
|
cursor: pointer;
|
|
2409
|
+
display: flex;
|
|
2410
|
+
flex-direction: column;
|
|
2411
|
+
}
|
|
2412
|
+
|
|
2413
|
+
.at_partition_child_header {
|
|
2414
|
+
width: 100%;
|
|
2415
|
+
padding-left: 5px;
|
|
2416
|
+
padding-right: 5px;
|
|
2417
|
+
display: flex;
|
|
2418
|
+
flex-direction: row;
|
|
2419
|
+
justify-content: space-between;
|
|
2408
2420
|
}
|
|
2409
2421
|
|
|
2410
2422
|
.at_partition_floor_row_item {
|
|
2411
|
-
|
|
2423
|
+
cursor: pointer;
|
|
2424
|
+
}
|
|
2425
|
+
|
|
2426
|
+
.at_partition_child_expand_icon {
|
|
2427
|
+
padding: unset !important;
|
|
2428
|
+
}
|
|
2429
|
+
|
|
2430
|
+
li.at_partition_floor_row_item,
|
|
2431
|
+
li.at_partition_wall_row_item {
|
|
2432
|
+
padding-right: unset !important;
|
|
2433
|
+
}
|
|
2434
|
+
|
|
2435
|
+
.at_partition_child_header.selected {
|
|
2436
|
+
padding-right: 5px !important;
|
|
2437
|
+
}
|
|
2438
|
+
|
|
2439
|
+
.at_hidden {
|
|
2440
|
+
display: none;
|
|
2441
|
+
}
|
|
2442
|
+
|
|
2443
|
+
.at_wall_window_row_item.selected {
|
|
2444
|
+
padding-left: 5px;
|
|
2412
2445
|
}
|