feat: highlight selected node
This commit is contained in:
@@ -5,6 +5,7 @@ class DrawerComponent {
|
||||
this.detailsDrawerContent = null;
|
||||
this.detailsDrawerBackdrop = null;
|
||||
this.activeDrawerComponent = null;
|
||||
this.onCloseCallback = null;
|
||||
}
|
||||
|
||||
// Determine if we should use desktop drawer behavior
|
||||
@@ -57,8 +58,9 @@ class DrawerComponent {
|
||||
});
|
||||
}
|
||||
|
||||
openDrawer(title, contentCallback, errorCallback) {
|
||||
openDrawer(title, contentCallback, errorCallback, onCloseCallback) {
|
||||
this.ensureDrawer();
|
||||
this.onCloseCallback = onCloseCallback;
|
||||
|
||||
// Set drawer title
|
||||
const titleEl = this.detailsDrawer.querySelector('.drawer-title');
|
||||
@@ -101,6 +103,12 @@ class DrawerComponent {
|
||||
closeDrawer() {
|
||||
if (this.detailsDrawer) this.detailsDrawer.classList.remove('open');
|
||||
if (this.detailsDrawerBackdrop) this.detailsDrawerBackdrop.classList.remove('visible');
|
||||
|
||||
// Call close callback if provided
|
||||
if (this.onCloseCallback) {
|
||||
this.onCloseCallback();
|
||||
this.onCloseCallback = null;
|
||||
}
|
||||
}
|
||||
|
||||
// Clean up drawer elements
|
||||
|
||||
Reference in New Issue
Block a user