Samad14 commited on
Commit
576df60
·
1 Parent(s): 1dc60a8

Fix Molstar drag: remove overflow-hidden, use direct container without absolute positioning

Browse files
bioai-platform/frontend/src/components/DockingViewer.tsx CHANGED
@@ -220,7 +220,7 @@ export function DockingViewer({
220
  }, [spinning, status]);
221
 
222
  return (
223
- <div className="w-full overflow-hidden rounded-lg border border-white/10 bg-[#0d1117]">
224
  <div className="flex flex-wrap items-center justify-between gap-2 border-b border-white/10 px-3 py-2">
225
  <span className="font-mono text-xs text-white/60">Docking pose — {pdbId}</span>
226
  <div className="flex items-center gap-2">
@@ -260,19 +260,17 @@ export function DockingViewer({
260
  </div>
261
  )}
262
 
263
- <div className="relative" style={{ height }}>
264
- <div ref={containerRef} className="absolute inset-0" style={{ width: '100%', height: '100%' }} />
265
- {status === 'loading' && (
266
- <div className="absolute inset-0 flex items-center justify-center bg-[#0d1117]/80 text-sm text-white/60 pointer-events-none">
267
- Loading structure...
268
- </div>
269
- )}
270
- {status === 'error' && (
271
- <div className="absolute inset-0 flex items-center justify-center bg-[#0d1117]/90 px-6 text-center text-sm text-red-400">
272
- {error}
273
- </div>
274
- )}
275
- </div>
276
  </div>
277
  );
278
  }
 
220
  }, [spinning, status]);
221
 
222
  return (
223
+ <div className="w-full rounded-lg border border-white/10 bg-[#0d1117]">
224
  <div className="flex flex-wrap items-center justify-between gap-2 border-b border-white/10 px-3 py-2">
225
  <span className="font-mono text-xs text-white/60">Docking pose — {pdbId}</span>
226
  <div className="flex items-center gap-2">
 
260
  </div>
261
  )}
262
 
263
+ <div ref={containerRef} style={{ height, minHeight: height, position: 'relative' }} />
264
+ {status === 'loading' && (
265
+ <div className="flex items-center justify-center py-4 text-sm text-white/60">
266
+ Loading structure...
267
+ </div>
268
+ )}
269
+ {status === 'error' && (
270
+ <div className="flex items-center justify-center py-4 px-6 text-center text-sm text-red-400">
271
+ {error}
272
+ </div>
273
+ )}
 
 
274
  </div>
275
  );
276
  }