@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.esm.js CHANGED
@@ -192,6 +192,7 @@ function registerToolbarExtension(Autodesk) {
192
192
  this.paginationGroup = null;
193
193
  this.viewables = [];
194
194
  this.currentIndex = 0;
195
+ this.docBrowserShouldBeOpen = false; // Track if doc browser should remain open
195
196
  }
196
197
  ToolbarExtension.prototype = Object.create(Autodesk.Viewing.Extension.prototype);
197
198
  ToolbarExtension.prototype.constructor = ToolbarExtension;
@@ -218,6 +219,10 @@ function registerToolbarExtension(Autodesk) {
218
219
  var _this = this;
219
220
  this.viewables = viewables;
220
221
  this.currentIndex = 0;
222
+ // If multiple pages, document browser will be auto-opened
223
+ if (viewables.length > 1) {
224
+ this.docBrowserShouldBeOpen = true;
225
+ }
221
226
  this.updatePaginationState();
222
227
  this.viewer.addEventListener(Autodesk.Viewing.MODEL_ADDED_EVENT, function (e) {
223
228
  _this.updateCurrentIndexFromModel();
@@ -273,6 +278,26 @@ function registerToolbarExtension(Autodesk) {
273
278
  if (this.viewables.length > 0 && this.viewables[this.currentIndex]) {
274
279
  var viewer = this.viewer;
275
280
  var toolbar = viewer.toolbar;
281
+ var self = this;
282
+
283
+ // Store Document Browser panel state before loading new page
284
+ var docBrowserExt = viewer.getExtension('Autodesk.DocumentBrowser');
285
+ var isCurrentlyOpen = docBrowserExt && docBrowserExt.ui && docBrowserExt.ui.panel && docBrowserExt.ui.panel.isVisible();
286
+
287
+ // Update flag - if currently open or flag is already set, keep it open
288
+ if (isCurrentlyOpen) {
289
+ this.docBrowserShouldBeOpen = true;
290
+ }
291
+
292
+ // Add one-time listener for geometry loaded to restore states
293
+ var _onGeometryLoaded = function onGeometryLoaded() {
294
+ viewer.removeEventListener(Autodesk.Viewing.GEOMETRY_LOADED_EVENT, _onGeometryLoaded);
295
+ // Restore after geometry is fully loaded
296
+ setTimeout(function () {
297
+ self.restoreButtonStates(self.docBrowserShouldBeOpen);
298
+ }, 200);
299
+ };
300
+ viewer.addEventListener(Autodesk.Viewing.GEOMETRY_LOADED_EVENT, _onGeometryLoaded);
276
301
  viewer.loadDocumentNode(viewer.model.getDocumentNode().getDocument(), this.viewables[this.currentIndex]).then(function () {
277
302
  var defaultGroups = ['settingsTools', 'modelTools', 'navTools'];
278
303
  defaultGroups.forEach(function (id) {
@@ -291,11 +316,170 @@ function registerToolbarExtension(Autodesk) {
291
316
  if (_this2.paginationGroup) _this2.paginationGroup.setVisible(true);
292
317
  toolbar.setVisible(true);
293
318
  _this2.updatePaginationState();
319
+
320
+ // Also restore immediately (may work for cached pages)
321
+ _this2.restoreButtonStates(_this2.docBrowserShouldBeOpen);
294
322
  })["catch"](function (err) {
295
323
  return console.error('Error loading viewable:', err);
296
324
  });
297
325
  }
298
326
  };
327
+ ToolbarExtension.prototype.restoreButtonStates = function (shouldOpenDocBrowser) {
328
+ var viewer = this.viewer;
329
+ var toolbar = viewer.toolbar;
330
+ if (!toolbar) return;
331
+ var self = this;
332
+
333
+ // Restore Document Browser state
334
+ var openDocBrowser = /*#__PURE__*/function () {
335
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
336
+ var docBrowserExt, _t;
337
+ return _regenerator().w(function (_context) {
338
+ while (1) switch (_context.p = _context.n) {
339
+ case 0:
340
+ if (shouldOpenDocBrowser) {
341
+ _context.n = 1;
342
+ break;
343
+ }
344
+ return _context.a(2);
345
+ case 1:
346
+ docBrowserExt = viewer.getExtension('Autodesk.DocumentBrowser'); // If extension is null, it was unloaded - we need to reload it
347
+ if (docBrowserExt) {
348
+ _context.n = 5;
349
+ break;
350
+ }
351
+ _context.p = 2;
352
+ _context.n = 3;
353
+ return viewer.loadExtension('Autodesk.DocumentBrowser');
354
+ case 3:
355
+ docBrowserExt = _context.v;
356
+ // After loading, we need to wait for the extension to fully initialize
357
+ // and then open the panel
358
+ setTimeout(function () {
359
+ if (docBrowserExt && docBrowserExt.ui) {
360
+ docBrowserExt.ui.togglePanel();
361
+ setTimeout(function () {
362
+ self.applyDocBrowserStyling();
363
+ self.checkButtonState();
364
+ }, 150);
365
+ }
366
+ }, 200);
367
+ return _context.a(2);
368
+ case 4:
369
+ _context.p = 4;
370
+ _t = _context.v;
371
+ console.error('[ToolbarExt] Failed to reload DocumentBrowser:', _t);
372
+ return _context.a(2);
373
+ case 5:
374
+ if (docBrowserExt.ui) {
375
+ _context.n = 6;
376
+ break;
377
+ }
378
+ return _context.a(2);
379
+ case 6:
380
+ if (!docBrowserExt.ui.panel) {
381
+ _context.n = 8;
382
+ break;
383
+ }
384
+ if (!docBrowserExt.ui.panel.isVisible()) {
385
+ _context.n = 7;
386
+ break;
387
+ }
388
+ self.applyDocBrowserStyling();
389
+ self.checkButtonState();
390
+ return _context.a(2);
391
+ case 7:
392
+ // Use setVisible(true) directly on the panel
393
+ docBrowserExt.ui.panel.setVisible(true);
394
+ setTimeout(function () {
395
+ self.applyDocBrowserStyling();
396
+ self.checkButtonState();
397
+ }, 100);
398
+ return _context.a(2);
399
+ case 8:
400
+ // If panel doesn't exist yet, use togglePanel to create it
401
+ if (typeof docBrowserExt.ui.togglePanel === 'function') {
402
+ docBrowserExt.ui.togglePanel();
403
+ setTimeout(function () {
404
+ self.applyDocBrowserStyling();
405
+ self.checkButtonState();
406
+ }, 150);
407
+ }
408
+ case 9:
409
+ return _context.a(2);
410
+ }
411
+ }, _callee, null, [[2, 4]]);
412
+ }));
413
+ return function openDocBrowser() {
414
+ return _ref.apply(this, arguments);
415
+ };
416
+ }();
417
+
418
+ // Restore Pan tool active state
419
+ var restorePanTool = function restorePanTool() {
420
+ self.activatePanTool();
421
+ };
422
+
423
+ // Call restore at multiple intervals to ensure it works
424
+ // Use longer delays since geometry needs to fully load
425
+ setTimeout(openDocBrowser, 300);
426
+ setTimeout(openDocBrowser, 600);
427
+ setTimeout(openDocBrowser, 1000);
428
+ setTimeout(restorePanTool, 100);
429
+ setTimeout(restorePanTool, 300);
430
+ };
431
+ ToolbarExtension.prototype.applyDocBrowserStyling = function () {
432
+ var viewer = this.viewer;
433
+ var ext = viewer.getExtension('Autodesk.DocumentBrowser');
434
+ if (ext && ext.ui && ext.ui.panel && ext.ui.panel.container) {
435
+ ext.ui.panel.container.style.top = '0';
436
+ ext.ui.panel.container.style.left = 'unset';
437
+ ext.ui.panel.container.style.right = '0px';
438
+ ext.ui.panel.container.style.width = '200px';
439
+ ext.ui.panel.container.style.height = '80%';
440
+ }
441
+
442
+ // Switch to Thumbnail tab
443
+ this.switchToThumbnailTab();
444
+ };
445
+ ToolbarExtension.prototype.switchToThumbnailTab = function () {
446
+ // Try multiple selectors to find the thumbnail tab button
447
+ 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) {
448
+ return btn.textContent.includes('Thumbnails') || btn.title.includes('Thumbnails');
449
+ });
450
+ if (thumbnailTab && !thumbnailTab.classList.contains('active')) {
451
+ thumbnailTab.click();
452
+ }
453
+ };
454
+ ToolbarExtension.prototype.activatePanTool = function () {
455
+ var viewer = this.viewer;
456
+ var toolbar = viewer.toolbar;
457
+ if (!toolbar) return;
458
+
459
+ // Activate pan tool using viewer API
460
+ try {
461
+ viewer.setActiveNavigationTool('pan');
462
+ } catch (e) {
463
+ // Fallback: click the original pan button
464
+ var originalPanBtn = document.getElementById('toolbar-panTool');
465
+ if (originalPanBtn) {
466
+ originalPanBtn.click();
467
+ }
468
+ }
469
+
470
+ // Update custom pan button visual state
471
+ var toolGroup = toolbar.getControl('custom-tool-group');
472
+ if (toolGroup) {
473
+ var panBtn = toolGroup.getControl('custom-pan-btn');
474
+ if (panBtn) {
475
+ panBtn.setState(Autodesk.Viewing.UI.Button.State.ACTIVE);
476
+ if (panBtn.container) {
477
+ panBtn.container.classList.add('active');
478
+ panBtn.container.classList.remove('inactive');
479
+ }
480
+ }
481
+ }
482
+ };
299
483
  ToolbarExtension.prototype.onToolbarCreated = function (toolbar) {
300
484
  var _this3 = this;
301
485
  this.refreshToolbar();
@@ -327,23 +511,41 @@ function registerToolbarExtension(Autodesk) {
327
511
  if (!viewer.toolbar) return;
328
512
  var toolGroup = viewer.toolbar.getControl('custom-tool-group');
329
513
  if (!toolGroup) return;
514
+
515
+ // Check Document Browser button state
330
516
  var docBtn = toolGroup.getControl('custom-doc-browser-btn');
331
- if (!docBtn) return;
332
- var ext = viewer.getExtension('Autodesk.DocumentBrowser');
333
- var isVisible = ext && ext.ui && ext.ui.panel && ext.ui.panel.isVisible();
334
- var newState = isVisible ? Autodesk.Viewing.UI.Button.State.ACTIVE : Autodesk.Viewing.UI.Button.State.INACTIVE;
335
- if (docBtn.getState() !== newState) {
336
- docBtn.setState(newState);
517
+ if (docBtn) {
518
+ var ext = viewer.getExtension('Autodesk.DocumentBrowser');
519
+ var isVisible = ext && ext.ui && ext.ui.panel && ext.ui.panel.isVisible();
520
+ var newState = isVisible ? Autodesk.Viewing.UI.Button.State.ACTIVE : Autodesk.Viewing.UI.Button.State.INACTIVE;
521
+ if (docBtn.getState() !== newState) {
522
+ docBtn.setState(newState);
523
+ }
524
+
525
+ // Force CSS class update to ensure visual state is correct
526
+ if (docBtn.container) {
527
+ if (isVisible) {
528
+ docBtn.container.classList.add('active');
529
+ docBtn.container.classList.remove('inactive');
530
+ } else {
531
+ docBtn.container.classList.remove('active');
532
+ docBtn.container.classList.add('inactive');
533
+ }
534
+ }
337
535
  }
338
536
 
339
- // Force CSS class update to ensure visual state is correct
340
- if (docBtn.container) {
341
- if (isVisible) {
342
- docBtn.container.classList.add('active');
343
- docBtn.container.classList.remove('inactive');
344
- } else {
345
- docBtn.container.classList.remove('active');
346
- docBtn.container.classList.add('inactive');
537
+ // Check Pan button state - ensure it stays active
538
+ var panBtn = toolGroup.getControl('custom-pan-btn');
539
+ if (panBtn) {
540
+ // Check if pan tool is the active tool
541
+ var activeTool = viewer.getActiveNavigationTool();
542
+ var isPanActive = activeTool === 'pan';
543
+ if (isPanActive) {
544
+ panBtn.setState(Autodesk.Viewing.UI.Button.State.ACTIVE);
545
+ if (panBtn.container) {
546
+ panBtn.container.classList.add('active');
547
+ panBtn.container.classList.remove('inactive');
548
+ }
347
549
  }
348
550
  }
349
551
  };
@@ -417,39 +619,46 @@ function registerToolbarExtension(Autodesk) {
417
619
  var docBrowserBtn = new Autodesk.Viewing.UI.Button('custom-doc-browser-btn');
418
620
  docBrowserBtn.setIcon('adsk-icon-documentModels');
419
621
  docBrowserBtn.setToolTip('Document Browser');
622
+ var self = this;
420
623
  docBrowserBtn.onClick = function () {
421
624
  var ext = viewer.getExtension('Autodesk.DocumentBrowser');
422
- if (ext && ext.ui) ext.ui.togglePanel();
625
+ if (ext && ext.ui) {
626
+ ext.ui.togglePanel();
627
+ // Update flag based on new state
628
+ setTimeout(function () {
629
+ self.docBrowserShouldBeOpen = ext.ui.panel && ext.ui.panel.isVisible();
630
+ }, 50);
631
+ }
423
632
  };
424
633
  this.subToolbar.addControl(docBrowserBtn);
425
634
  var downloadBtn = new Autodesk.Viewing.UI.Button('custom-download-btn');
426
635
  downloadBtn.setIcon('adsk-icon-custom-download');
427
636
  downloadBtn.setToolTip('Download File');
428
- downloadBtn.onClick = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
429
- var fileUrl, response, blob, urlPath, filename, blobUrl, anchor, _t;
430
- return _regenerator().w(function (_context) {
431
- while (1) switch (_context.p = _context.n) {
637
+ downloadBtn.onClick = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
638
+ var fileUrl, response, blob, urlPath, filename, blobUrl, anchor, _t2;
639
+ return _regenerator().w(function (_context2) {
640
+ while (1) switch (_context2.p = _context2.n) {
432
641
  case 0:
433
642
  if (!(_this4.options && _this4.options.filePath)) {
434
- _context.n = 7;
643
+ _context2.n = 7;
435
644
  break;
436
645
  }
437
- _context.p = 1;
646
+ _context2.p = 1;
438
647
  fileUrl = _this4.options.filePath;
439
- _context.n = 2;
648
+ _context2.n = 2;
440
649
  return fetch(fileUrl);
441
650
  case 2:
442
- response = _context.v;
651
+ response = _context2.v;
443
652
  if (response.ok) {
444
- _context.n = 3;
653
+ _context2.n = 3;
445
654
  break;
446
655
  }
447
656
  throw new Error("HTTP error! status: ".concat(response.status));
448
657
  case 3:
449
- _context.n = 4;
658
+ _context2.n = 4;
450
659
  return response.blob();
451
660
  case 4:
452
- blob = _context.v;
661
+ blob = _context2.v;
453
662
  urlPath = new URL(fileUrl).pathname;
454
663
  filename = decodeURIComponent(urlPath.split('/').pop()) || 'document.pdf';
455
664
  blobUrl = URL.createObjectURL(blob);
@@ -461,23 +670,23 @@ function registerToolbarExtension(Autodesk) {
461
670
  anchor.click();
462
671
  document.body.removeChild(anchor);
463
672
  URL.revokeObjectURL(blobUrl);
464
- _context.n = 6;
673
+ _context2.n = 6;
465
674
  break;
466
675
  case 5:
467
- _context.p = 5;
468
- _t = _context.v;
469
- console.error('Download error:', _t);
470
- alert('Unable to download file: ' + _t.message);
676
+ _context2.p = 5;
677
+ _t2 = _context2.v;
678
+ console.error('Download error:', _t2);
679
+ alert('Unable to download file: ' + _t2.message);
471
680
  case 6:
472
- _context.n = 8;
681
+ _context2.n = 8;
473
682
  break;
474
683
  case 7:
475
684
  console.warn('FilePath not available in extension options');
476
685
  alert('File path not available for download');
477
686
  case 8:
478
- return _context.a(2);
687
+ return _context2.a(2);
479
688
  }
480
- }, _callee, null, [[1, 5]]);
689
+ }, _callee2, null, [[1, 5]]);
481
690
  }));
482
691
  this.subToolbar.addControl(downloadBtn);
483
692
  };
@@ -603,7 +812,7 @@ function styleInject(css, ref) {
603
812
  }
604
813
  }
605
814
 
606
- 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";
815
+ 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";
607
816
  styleInject(css_248z$1);
608
817
 
609
818
  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";
@@ -686,10 +895,12 @@ var ViewerForgePDF = function ViewerForgePDF(_ref) {
686
895
  // Apply custom styling to the panel
687
896
  var documentBrowser = viewer.getExtension('Autodesk.DocumentBrowser');
688
897
  if (documentBrowser && documentBrowser.ui && documentBrowser.ui.panel) {
689
- documentBrowser.ui.panel.container.style.top = 0;
898
+ documentBrowser.ui.panel.container.style.top = '0';
690
899
  documentBrowser.ui.panel.container.style.left = 'unset';
691
900
  documentBrowser.ui.panel.container.style.right = '0px';
692
901
  documentBrowser.ui.panel.container.style.width = '200px';
902
+ documentBrowser.ui.panel.container.style.height = '80%';
903
+ documentBrowser.ui.panel.container.style.minHeight = '400px';
693
904
  }
694
905
 
695
906
  // Switch to Thumbnail tab after a short delay
@@ -751,7 +962,8 @@ var ViewerForgePDF = function ViewerForgePDF(_ref) {
751
962
  }, _callee);
752
963
  })));
753
964
  }
754
- }, [status, filePath, fileExt, setViewer]);
965
+ // eslint-disable-next-line react-hooks/exhaustive-deps
966
+ }, [status, filePath, fileExt]);
755
967
  return /*#__PURE__*/jsx("div", {
756
968
  style: {
757
969
  position: 'relative',