@dtducas/wh-forge-viewer 1.0.4 → 1.0.5

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/dist/index.js CHANGED
@@ -194,6 +194,7 @@ function registerToolbarExtension(Autodesk) {
194
194
  this.paginationGroup = null;
195
195
  this.viewables = [];
196
196
  this.currentIndex = 0;
197
+ this.docBrowserShouldBeOpen = false; // Track if doc browser should remain open
197
198
  }
198
199
  ToolbarExtension.prototype = Object.create(Autodesk.Viewing.Extension.prototype);
199
200
  ToolbarExtension.prototype.constructor = ToolbarExtension;
@@ -220,6 +221,10 @@ function registerToolbarExtension(Autodesk) {
220
221
  var _this = this;
221
222
  this.viewables = viewables;
222
223
  this.currentIndex = 0;
224
+ // If multiple pages, document browser will be auto-opened
225
+ if (viewables.length > 1) {
226
+ this.docBrowserShouldBeOpen = true;
227
+ }
223
228
  this.updatePaginationState();
224
229
  this.viewer.addEventListener(Autodesk.Viewing.MODEL_ADDED_EVENT, function (e) {
225
230
  _this.updateCurrentIndexFromModel();
@@ -275,6 +280,26 @@ function registerToolbarExtension(Autodesk) {
275
280
  if (this.viewables.length > 0 && this.viewables[this.currentIndex]) {
276
281
  var viewer = this.viewer;
277
282
  var toolbar = viewer.toolbar;
283
+ var self = this;
284
+
285
+ // Store Document Browser panel state before loading new page
286
+ var docBrowserExt = viewer.getExtension('Autodesk.DocumentBrowser');
287
+ var isCurrentlyOpen = docBrowserExt && docBrowserExt.ui && docBrowserExt.ui.panel && docBrowserExt.ui.panel.isVisible();
288
+
289
+ // Update flag - if currently open or flag is already set, keep it open
290
+ if (isCurrentlyOpen) {
291
+ this.docBrowserShouldBeOpen = true;
292
+ }
293
+
294
+ // Add one-time listener for geometry loaded to restore states
295
+ var _onGeometryLoaded = function onGeometryLoaded() {
296
+ viewer.removeEventListener(Autodesk.Viewing.GEOMETRY_LOADED_EVENT, _onGeometryLoaded);
297
+ // Restore after geometry is fully loaded
298
+ setTimeout(function () {
299
+ self.restoreButtonStates(self.docBrowserShouldBeOpen);
300
+ }, 200);
301
+ };
302
+ viewer.addEventListener(Autodesk.Viewing.GEOMETRY_LOADED_EVENT, _onGeometryLoaded);
278
303
  viewer.loadDocumentNode(viewer.model.getDocumentNode().getDocument(), this.viewables[this.currentIndex]).then(function () {
279
304
  var defaultGroups = ['settingsTools', 'modelTools', 'navTools'];
280
305
  defaultGroups.forEach(function (id) {
@@ -293,11 +318,170 @@ function registerToolbarExtension(Autodesk) {
293
318
  if (_this2.paginationGroup) _this2.paginationGroup.setVisible(true);
294
319
  toolbar.setVisible(true);
295
320
  _this2.updatePaginationState();
321
+
322
+ // Also restore immediately (may work for cached pages)
323
+ _this2.restoreButtonStates(_this2.docBrowserShouldBeOpen);
296
324
  })["catch"](function (err) {
297
325
  return console.error('Error loading viewable:', err);
298
326
  });
299
327
  }
300
328
  };
329
+ ToolbarExtension.prototype.restoreButtonStates = function (shouldOpenDocBrowser) {
330
+ var viewer = this.viewer;
331
+ var toolbar = viewer.toolbar;
332
+ if (!toolbar) return;
333
+ var self = this;
334
+
335
+ // Restore Document Browser state
336
+ var openDocBrowser = /*#__PURE__*/function () {
337
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
338
+ var docBrowserExt, _t;
339
+ return _regenerator().w(function (_context) {
340
+ while (1) switch (_context.p = _context.n) {
341
+ case 0:
342
+ if (shouldOpenDocBrowser) {
343
+ _context.n = 1;
344
+ break;
345
+ }
346
+ return _context.a(2);
347
+ case 1:
348
+ docBrowserExt = viewer.getExtension('Autodesk.DocumentBrowser'); // If extension is null, it was unloaded - we need to reload it
349
+ if (docBrowserExt) {
350
+ _context.n = 5;
351
+ break;
352
+ }
353
+ _context.p = 2;
354
+ _context.n = 3;
355
+ return viewer.loadExtension('Autodesk.DocumentBrowser');
356
+ case 3:
357
+ docBrowserExt = _context.v;
358
+ // After loading, we need to wait for the extension to fully initialize
359
+ // and then open the panel
360
+ setTimeout(function () {
361
+ if (docBrowserExt && docBrowserExt.ui) {
362
+ docBrowserExt.ui.togglePanel();
363
+ setTimeout(function () {
364
+ self.applyDocBrowserStyling();
365
+ self.checkButtonState();
366
+ }, 150);
367
+ }
368
+ }, 200);
369
+ return _context.a(2);
370
+ case 4:
371
+ _context.p = 4;
372
+ _t = _context.v;
373
+ console.error('[ToolbarExt] Failed to reload DocumentBrowser:', _t);
374
+ return _context.a(2);
375
+ case 5:
376
+ if (docBrowserExt.ui) {
377
+ _context.n = 6;
378
+ break;
379
+ }
380
+ return _context.a(2);
381
+ case 6:
382
+ if (!docBrowserExt.ui.panel) {
383
+ _context.n = 8;
384
+ break;
385
+ }
386
+ if (!docBrowserExt.ui.panel.isVisible()) {
387
+ _context.n = 7;
388
+ break;
389
+ }
390
+ self.applyDocBrowserStyling();
391
+ self.checkButtonState();
392
+ return _context.a(2);
393
+ case 7:
394
+ // Use setVisible(true) directly on the panel
395
+ docBrowserExt.ui.panel.setVisible(true);
396
+ setTimeout(function () {
397
+ self.applyDocBrowserStyling();
398
+ self.checkButtonState();
399
+ }, 100);
400
+ return _context.a(2);
401
+ case 8:
402
+ // If panel doesn't exist yet, use togglePanel to create it
403
+ if (typeof docBrowserExt.ui.togglePanel === 'function') {
404
+ docBrowserExt.ui.togglePanel();
405
+ setTimeout(function () {
406
+ self.applyDocBrowserStyling();
407
+ self.checkButtonState();
408
+ }, 150);
409
+ }
410
+ case 9:
411
+ return _context.a(2);
412
+ }
413
+ }, _callee, null, [[2, 4]]);
414
+ }));
415
+ return function openDocBrowser() {
416
+ return _ref.apply(this, arguments);
417
+ };
418
+ }();
419
+
420
+ // Restore Pan tool active state
421
+ var restorePanTool = function restorePanTool() {
422
+ self.activatePanTool();
423
+ };
424
+
425
+ // Call restore at multiple intervals to ensure it works
426
+ // Use longer delays since geometry needs to fully load
427
+ setTimeout(openDocBrowser, 300);
428
+ setTimeout(openDocBrowser, 600);
429
+ setTimeout(openDocBrowser, 1000);
430
+ setTimeout(restorePanTool, 100);
431
+ setTimeout(restorePanTool, 300);
432
+ };
433
+ ToolbarExtension.prototype.applyDocBrowserStyling = function () {
434
+ var viewer = this.viewer;
435
+ var ext = viewer.getExtension('Autodesk.DocumentBrowser');
436
+ if (ext && ext.ui && ext.ui.panel && ext.ui.panel.container) {
437
+ ext.ui.panel.container.style.top = '0';
438
+ ext.ui.panel.container.style.left = 'unset';
439
+ ext.ui.panel.container.style.right = '0px';
440
+ ext.ui.panel.container.style.width = '200px';
441
+ ext.ui.panel.container.style.height = '80%';
442
+ }
443
+
444
+ // Switch to Thumbnail tab
445
+ this.switchToThumbnailTab();
446
+ };
447
+ ToolbarExtension.prototype.switchToThumbnailTab = function () {
448
+ // Try multiple selectors to find the thumbnail tab button
449
+ var thumbnailTab = document.querySelector('.docking-panel-thumbnail-view') || document.querySelector('[data-i18n="Thumbnails"]') || Array.from(document.querySelectorAll('.adsk-control-group .adsk-button')).find(function (btn) {
450
+ return btn.textContent.includes('Thumbnails') || btn.title.includes('Thumbnails');
451
+ });
452
+ if (thumbnailTab && !thumbnailTab.classList.contains('active')) {
453
+ thumbnailTab.click();
454
+ }
455
+ };
456
+ ToolbarExtension.prototype.activatePanTool = function () {
457
+ var viewer = this.viewer;
458
+ var toolbar = viewer.toolbar;
459
+ if (!toolbar) return;
460
+
461
+ // Activate pan tool using viewer API
462
+ try {
463
+ viewer.setActiveNavigationTool('pan');
464
+ } catch (e) {
465
+ // Fallback: click the original pan button
466
+ var originalPanBtn = document.getElementById('toolbar-panTool');
467
+ if (originalPanBtn) {
468
+ originalPanBtn.click();
469
+ }
470
+ }
471
+
472
+ // Update custom pan button visual state
473
+ var toolGroup = toolbar.getControl('custom-tool-group');
474
+ if (toolGroup) {
475
+ var panBtn = toolGroup.getControl('custom-pan-btn');
476
+ if (panBtn) {
477
+ panBtn.setState(Autodesk.Viewing.UI.Button.State.ACTIVE);
478
+ if (panBtn.container) {
479
+ panBtn.container.classList.add('active');
480
+ panBtn.container.classList.remove('inactive');
481
+ }
482
+ }
483
+ }
484
+ };
301
485
  ToolbarExtension.prototype.onToolbarCreated = function (toolbar) {
302
486
  var _this3 = this;
303
487
  this.refreshToolbar();
@@ -329,23 +513,41 @@ function registerToolbarExtension(Autodesk) {
329
513
  if (!viewer.toolbar) return;
330
514
  var toolGroup = viewer.toolbar.getControl('custom-tool-group');
331
515
  if (!toolGroup) return;
516
+
517
+ // Check Document Browser button state
332
518
  var docBtn = toolGroup.getControl('custom-doc-browser-btn');
333
- if (!docBtn) return;
334
- var ext = viewer.getExtension('Autodesk.DocumentBrowser');
335
- var isVisible = ext && ext.ui && ext.ui.panel && ext.ui.panel.isVisible();
336
- var newState = isVisible ? Autodesk.Viewing.UI.Button.State.ACTIVE : Autodesk.Viewing.UI.Button.State.INACTIVE;
337
- if (docBtn.getState() !== newState) {
338
- docBtn.setState(newState);
519
+ if (docBtn) {
520
+ var ext = viewer.getExtension('Autodesk.DocumentBrowser');
521
+ var isVisible = ext && ext.ui && ext.ui.panel && ext.ui.panel.isVisible();
522
+ var newState = isVisible ? Autodesk.Viewing.UI.Button.State.ACTIVE : Autodesk.Viewing.UI.Button.State.INACTIVE;
523
+ if (docBtn.getState() !== newState) {
524
+ docBtn.setState(newState);
525
+ }
526
+
527
+ // Force CSS class update to ensure visual state is correct
528
+ if (docBtn.container) {
529
+ if (isVisible) {
530
+ docBtn.container.classList.add('active');
531
+ docBtn.container.classList.remove('inactive');
532
+ } else {
533
+ docBtn.container.classList.remove('active');
534
+ docBtn.container.classList.add('inactive');
535
+ }
536
+ }
339
537
  }
340
538
 
341
- // Force CSS class update to ensure visual state is correct
342
- if (docBtn.container) {
343
- if (isVisible) {
344
- docBtn.container.classList.add('active');
345
- docBtn.container.classList.remove('inactive');
346
- } else {
347
- docBtn.container.classList.remove('active');
348
- docBtn.container.classList.add('inactive');
539
+ // Check Pan button state - ensure it stays active
540
+ var panBtn = toolGroup.getControl('custom-pan-btn');
541
+ if (panBtn) {
542
+ // Check if pan tool is the active tool
543
+ var activeTool = viewer.getActiveNavigationTool();
544
+ var isPanActive = activeTool === 'pan';
545
+ if (isPanActive) {
546
+ panBtn.setState(Autodesk.Viewing.UI.Button.State.ACTIVE);
547
+ if (panBtn.container) {
548
+ panBtn.container.classList.add('active');
549
+ panBtn.container.classList.remove('inactive');
550
+ }
349
551
  }
350
552
  }
351
553
  };
@@ -419,39 +621,46 @@ function registerToolbarExtension(Autodesk) {
419
621
  var docBrowserBtn = new Autodesk.Viewing.UI.Button('custom-doc-browser-btn');
420
622
  docBrowserBtn.setIcon('adsk-icon-documentModels');
421
623
  docBrowserBtn.setToolTip('Document Browser');
624
+ var self = this;
422
625
  docBrowserBtn.onClick = function () {
423
626
  var ext = viewer.getExtension('Autodesk.DocumentBrowser');
424
- if (ext && ext.ui) ext.ui.togglePanel();
627
+ if (ext && ext.ui) {
628
+ ext.ui.togglePanel();
629
+ // Update flag based on new state
630
+ setTimeout(function () {
631
+ self.docBrowserShouldBeOpen = ext.ui.panel && ext.ui.panel.isVisible();
632
+ }, 50);
633
+ }
425
634
  };
426
635
  this.subToolbar.addControl(docBrowserBtn);
427
636
  var downloadBtn = new Autodesk.Viewing.UI.Button('custom-download-btn');
428
637
  downloadBtn.setIcon('adsk-icon-custom-download');
429
638
  downloadBtn.setToolTip('Download File');
430
- downloadBtn.onClick = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
431
- var fileUrl, response, blob, urlPath, filename, blobUrl, anchor, _t;
432
- return _regenerator().w(function (_context) {
433
- while (1) switch (_context.p = _context.n) {
639
+ downloadBtn.onClick = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
640
+ var fileUrl, response, blob, urlPath, filename, blobUrl, anchor, _t2;
641
+ return _regenerator().w(function (_context2) {
642
+ while (1) switch (_context2.p = _context2.n) {
434
643
  case 0:
435
644
  if (!(_this4.options && _this4.options.filePath)) {
436
- _context.n = 7;
645
+ _context2.n = 7;
437
646
  break;
438
647
  }
439
- _context.p = 1;
648
+ _context2.p = 1;
440
649
  fileUrl = _this4.options.filePath;
441
- _context.n = 2;
650
+ _context2.n = 2;
442
651
  return fetch(fileUrl);
443
652
  case 2:
444
- response = _context.v;
653
+ response = _context2.v;
445
654
  if (response.ok) {
446
- _context.n = 3;
655
+ _context2.n = 3;
447
656
  break;
448
657
  }
449
658
  throw new Error("HTTP error! status: ".concat(response.status));
450
659
  case 3:
451
- _context.n = 4;
660
+ _context2.n = 4;
452
661
  return response.blob();
453
662
  case 4:
454
- blob = _context.v;
663
+ blob = _context2.v;
455
664
  urlPath = new URL(fileUrl).pathname;
456
665
  filename = decodeURIComponent(urlPath.split('/').pop()) || 'document.pdf';
457
666
  blobUrl = URL.createObjectURL(blob);
@@ -463,23 +672,23 @@ function registerToolbarExtension(Autodesk) {
463
672
  anchor.click();
464
673
  document.body.removeChild(anchor);
465
674
  URL.revokeObjectURL(blobUrl);
466
- _context.n = 6;
675
+ _context2.n = 6;
467
676
  break;
468
677
  case 5:
469
- _context.p = 5;
470
- _t = _context.v;
471
- console.error('Download error:', _t);
472
- alert('Unable to download file: ' + _t.message);
678
+ _context2.p = 5;
679
+ _t2 = _context2.v;
680
+ console.error('Download error:', _t2);
681
+ alert('Unable to download file: ' + _t2.message);
473
682
  case 6:
474
- _context.n = 8;
683
+ _context2.n = 8;
475
684
  break;
476
685
  case 7:
477
686
  console.warn('FilePath not available in extension options');
478
687
  alert('File path not available for download');
479
688
  case 8:
480
- return _context.a(2);
689
+ return _context2.a(2);
481
690
  }
482
- }, _callee, null, [[1, 5]]);
691
+ }, _callee2, null, [[1, 5]]);
483
692
  }));
484
693
  this.subToolbar.addControl(downloadBtn);
485
694
  };
@@ -605,7 +814,7 @@ function styleInject(css, ref) {
605
814
  }
606
815
  }
607
816
 
608
- var css_248z$1 = "#navTools,\n#modelTools,\n#settingsTools,\n#measureTools {\n display: none !important;\n visibility: hidden !important;\n}\n#guiviewer3d-toolbar {\n display: flex !important;\n align-items: center !important;\n justify-content: center !important;\n gap: 20px;\n position: fixed !important;\n bottom: 10px !important;\n left: 50% !important;\n transform: translateX(-50%) !important;\n width: auto !important;\n border-radius: 4px !important;\n padding: 8px 12px !important;\n}\n#custom-tool-group {\n display: flex !important;\n margin: 0 !important;\n padding: 0 !important;\n}\n#custom-pagination-group {\n display: flex;\n position: relative !important;\n margin: 0 !important;\n padding: 0 !important;\n transform: none !important;\n left: auto !important;\n}\n";
817
+ var css_248z$1 = "#navTools,\n#modelTools,\n#settingsTools,\n#measureTools {\n display: none !important;\n visibility: hidden !important;\n}\n#guiviewer3d-toolbar {\n display: flex !important;\n align-items: center !important;\n justify-content: center !important;\n gap: 20px;\n position: fixed !important;\n bottom: 10px !important;\n left: 50% !important;\n transform: translateX(-50%) !important;\n width: auto !important;\n border-radius: 4px !important;\n padding: 8px 12px !important;\n}\n#custom-tool-group {\n display: flex !important;\n margin: 0 !important;\n padding: 0 !important;\n}\n#custom-pagination-group {\n display: flex;\n position: relative !important;\n margin: 0 !important;\n padding: 0 !important;\n transform: none !important;\n left: auto !important;\n}\n\n/* Document Browser Panel Styling */\n.docking-panel.document-browser-panel,\n.adsk-viewing-viewer .docking-panel.document-browser-panel {\n min-height: 400px !important;\n height: 80% !important;\n max-height: 80vh !important;\n}\n\n/* Ensure thumbnail container has proper height */\n.docking-panel.document-browser-panel .docking-panel-container-solid-color-a,\n.document-browser-panel .treeview,\n.document-browser-panel .thumbnails-container {\n height: calc(100% - 50px) !important;\n min-height: 350px !important;\n overflow-y: auto !important;\n}\n\n/* Thumbnail cards styling */\n.document-browser-panel .thumbnail-item,\n.document-browser-panel .thumbnail {\n display: flex !important;\n visibility: visible !important;\n}\n\n/* Ensure thumbnail images are visible */\n.document-browser-panel .thumbnail img,\n.document-browser-panel .thumbnail-item img {\n display: block !important;\n visibility: visible !important;\n max-width: 100% !important;\n height: auto !important;\n}\n";
609
818
  styleInject(css_248z$1);
610
819
 
611
820
  var css_248z = "/* Custom icon styles for toolbar using SVG */\n\n/* Download icon - custom SVG */\n.adsk-icon-custom-download::before {\n content: '';\n display: inline-block;\n width: 24px;\n height: 24px;\n background-image: url('data:image/svg+xml;utf8,\\\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">\\\n<path fill=\"%23FFFFFF\" d=\"M9.293 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V4.707A1 1 0 0 0 13.707 4L10 .293A1 1 0 0 0 9.293 0M9.5 3.5v-2l3 3h-2a1 1 0 0 1-1-1m-1 4v3.793l1.146-1.147a.5.5 0 0 1 .708.708l-2 2a.5.5 0 0 1-.708 0l-2-2a.5.5 0 0 1 .708-.708L7.5 11.293V7.5a.5.5 0 0 1 1 0\"/>\\\n</svg>');\n background-repeat: no-repeat;\n background-position: center;\n background-size: 16px 16px;\n}\n\n/* Previous page icon - Font Awesome chevron left */\n.adsk-icon-custom-prev::before {\n content: '';\n display: inline-block;\n width: 24px;\n height: 24px;\n background-image: url('data:image/svg+xml;utf8,\\\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">\\\n<path fill=\"%23FFFFFF\" d=\"M16 14a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h12a2 2 0 0 1 2 2zm-4.5-6.5H5.707l2.147-2.146a.5.5 0 1 0-.708-.708l-3 3a.5.5 0 0 0 0 .708l3 3a.5.5 0 0 0 .708-.708L5.707 8.5H11.5a.5.5 0 0 0 0-1\"/>\\\n</svg>');\n background-repeat: no-repeat;\n background-position: center;\n background-size: 16px 16px;\n}\n\n/* Next page icon - Font Awesome chevron right */\n.adsk-icon-custom-next::before {\n content: '';\n display: inline-block;\n width: 24px;\n height: 24px;\n background-image: url('data:image/svg+xml;utf8,\\\n<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\">\\\n<path fill=\"%23FFFFFF\" d=\"M0 14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H2a2 2 0 0 0-2 2zm4.5-6.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5a.5.5 0 0 1 0-1\"/>\\\n</svg>');\n background-repeat: no-repeat;\n background-position: center;\n background-size: 16px 16px;\n}\n\n/* Fallback for adsk-icon-caret-left and adsk-icon-caret-right if not defined */\n.adsk-icon-caret-left::before {\n content: '[';\n font-family: 'adsk-viewing';\n}\n\n.adsk-icon-caret-right::before {\n content: ']';\n font-family: 'adsk-viewing';\n}\n\n/* Comment icon - custom SVG (Smiley) */\n.adsk-icon-custom-comment::before {\n content: '';\n display: inline-block;\n width: 24px;\n height: 24px;\n background-image: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23FFFFFF\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"10\"></circle><path d=\"M8 14s1.5 2 4 2 4-2 4-2\"></path><line x1=\"9\" y1=\"9\" x2=\"9.01\" y2=\"9\"></line><line x1=\"15\" y1=\"9\" x2=\"15.01\" y2=\"9\"></line></svg>');\n background-repeat: no-repeat;\n background-position: center;\n background-size: contain;\n}\n\n/* Save icon - custom SVG */\n.adsk-icon-custom-save::before {\n content: '';\n display: inline-block;\n width: 24px;\n height: 24px;\n background-image: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"%23FFFFFF\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z\"></path><polyline points=\"17 21 17 13 7 13 7 21\"></polyline><polyline points=\"7 3 7 8 15 8\"></polyline></svg>');\n background-repeat: no-repeat;\n background-position: center;\n background-size: contain;\n}\n";
@@ -688,10 +897,12 @@ var ViewerForgePDF = function ViewerForgePDF(_ref) {
688
897
  // Apply custom styling to the panel
689
898
  var documentBrowser = viewer.getExtension('Autodesk.DocumentBrowser');
690
899
  if (documentBrowser && documentBrowser.ui && documentBrowser.ui.panel) {
691
- documentBrowser.ui.panel.container.style.top = 0;
900
+ documentBrowser.ui.panel.container.style.top = '0';
692
901
  documentBrowser.ui.panel.container.style.left = 'unset';
693
902
  documentBrowser.ui.panel.container.style.right = '0px';
694
903
  documentBrowser.ui.panel.container.style.width = '200px';
904
+ documentBrowser.ui.panel.container.style.height = '80%';
905
+ documentBrowser.ui.panel.container.style.minHeight = '400px';
695
906
  }
696
907
 
697
908
  // Switch to Thumbnail tab after a short delay
@@ -753,7 +964,8 @@ var ViewerForgePDF = function ViewerForgePDF(_ref) {
753
964
  }, _callee);
754
965
  })));
755
966
  }
756
- }, [status, filePath, fileExt, setViewer]);
967
+ // eslint-disable-next-line react-hooks/exhaustive-deps
968
+ }, [status, filePath, fileExt]);
757
969
  return /*#__PURE__*/jsxRuntime.jsx("div", {
758
970
  style: {
759
971
  position: 'relative',