Ver Fonte

Added an option to the components spec to allow disabling of the drag-and-drop overlap for Molstar that loads files into the viewer. By default the drag overlay is enabled, just as it was before

Jason Pattle há 3 anos atrás
pai
commit
47433a51d3
2 ficheiros alterados com 3 adições e 2 exclusões
  1. 1 1
      src/mol-plugin-ui/plugin.tsx
  2. 2 1
      src/mol-plugin-ui/spec.ts

+ 1 - 1
src/mol-plugin-ui/plugin.tsx

@@ -159,7 +159,7 @@ class Layout extends PluginUIComponent {
                     {layout.showControls && controls.bottom !== 'none' && this.region('bottom', controls.bottom || Log)}
                 </div>
                 {!this.plugin.spec.components?.hideTaskOverlay && <OverlayTaskProgress />}
-                <DragOverlay plugin={this.plugin} showDragOverlay={this.showDragOverlay} />
+                {!this.plugin.spec.components?.disableDragOverlay && <DragOverlay plugin={this.plugin} showDragOverlay={this.showDragOverlay} />}
             </div>
         </div>;
     }

+ 2 - 1
src/mol-plugin-ui/spec.ts

@@ -24,7 +24,8 @@ interface PluginUISpec extends PluginSpec {
             view?: React.ComponentClass,
             controls?: React.ComponentClass
         },
-        hideTaskOverlay?: boolean
+        hideTaskOverlay?: boolean,
+        disableDragOverlay?: boolean,
     },
 }