|
@@ -4,7 +4,6 @@ import { updateSiteColors } from '../tmdet-extension/tmdet-color-theme';
|
|
|
import { RcsbFv, RcsbFvBoardConfigInterface } from '@rcsb/rcsb-saguaro';
|
|
|
import { fetchDescriptor } from '../UniTmpHelper';
|
|
|
import { setExternalRowTitleComponent, setRegionColors } from '../FeatureViewConfig';
|
|
|
-import { TmRowTitleComponent } from './TmRowTitleComponent';
|
|
|
|
|
|
const defaultViewerWidth = 600;
|
|
|
const defaultRowTitleWidth = 100;
|
|
@@ -95,7 +94,7 @@ export class TmFv1DElement extends HTMLElement {
|
|
|
? parseInt(this.getAttribute("trackWidth")!) || (defaultViewerWidth - ULTIMATE_GAP_CONSTANT)
|
|
|
: calculatedWidth;
|
|
|
trackWidth -= rowTitleWidth;
|
|
|
- console.log('Widths:', [ rowTitleWidth, trackWidth ]);
|
|
|
+ console.log(`${elementId} Widths:`, [ rowTitleWidth, trackWidth ]);
|
|
|
|
|
|
root.render(
|
|
|
<TmFv1D
|
|
@@ -107,7 +106,21 @@ export class TmFv1DElement extends HTMLElement {
|
|
|
autoResize={ autoResize }
|
|
|
/>
|
|
|
);
|
|
|
+
|
|
|
+ setTimeout(() => this.triggerResize(elementId), 250);
|
|
|
}
|
|
|
+
|
|
|
+ public triggerResize(id: string): void {
|
|
|
+ const element = document.getElementById(id);
|
|
|
+ if (!element) {
|
|
|
+ console.warn(`'${id}' element not found`);
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ const paddingRight = element.style.paddingRight;
|
|
|
+ element.style.setProperty('padding-right', '1px');
|
|
|
+ setTimeout(() => element.style.setProperty('padding-right', paddingRight), 250);
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
function calculateViewerWidth(parent: HTMLElement|null) {
|