feat(clipping): implement hide/recover toggle for all section dialogs
Update all three section dialogs to support hide/show toggle: SectionAxisDialogManager: - onHideToggle now calls hideSection()/recoverSection() SectionBoxDialogManager: - onHideToggle now calls hideSection()/recoverSection() SectionPlanePanel: - Add isHidden state tracking - Change onHide to onHideToggle(isHidden) - Add setHiddenState/getHiddenState methods - Update button to toggle active state SectionPlaneDialogManager: - Switch to onHideToggle callback - Call hideSection()/recoverSection() based on toggle state Behavior: Click hide button to hide section, click again to recover.
This commit is contained in:
@@ -261,16 +261,23 @@ export class SectionBoxPanel implements IBimComponent {
|
||||
|
||||
const stop = (e: PointerEvent) => {
|
||||
if (this.dragState.isDragging && this.dragState.pointerId === e.pointerId) {
|
||||
handle.releasePointerCapture(e.pointerId);
|
||||
if (handle.hasPointerCapture(e.pointerId)) {
|
||||
handle.releasePointerCapture(e.pointerId);
|
||||
}
|
||||
(handle.closest('.section-box-slider') as HTMLElement).style.zIndex = '';
|
||||
handle.classList.remove('dragging');
|
||||
this.dragState.isDragging = false;
|
||||
this.dragState.pointerId = null;
|
||||
this.dragState = {
|
||||
isDragging: false,
|
||||
axis: null,
|
||||
handleType: null,
|
||||
pointerId: null
|
||||
};
|
||||
}
|
||||
};
|
||||
|
||||
handle.addEventListener('pointerup', stop);
|
||||
handle.addEventListener('pointercancel', stop);
|
||||
handle.addEventListener('lostpointercapture', stop);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user