Browse Source

Merge branch 'master' into dev-sb-motifvis

JonStargaryen 3 years ago
parent
commit
b39ae6f82c
5 changed files with 19 additions and 7 deletions
  1. 8 0
      CHANGELOG.md
  2. 2 2
      package-lock.json
  3. 1 1
      package.json
  4. 1 0
      src/viewer/index.html
  5. 7 4
      src/viewer/index.ts

+ 8 - 0
CHANGELOG.md

@@ -2,6 +2,14 @@
 
 [Semantic Versioning](https://semver.org/)
 
+## [1.6.5] - 2021-06-03
+### Bug fixes
+- Access to maps.rcsb.org via HTTPS
+
+## [1.6.4] - 2021-06-02
+### Added
+- Option to show membrane orientation preset
+
 ## [1.6.3] - 2021-06-01
 ### Bug fixes
 - Improve quality of ANVIL prediction

+ 2 - 2
package-lock.json

@@ -1,12 +1,12 @@
 {
     "name": "@rcsb/rcsb-molstar",
-    "version": "1.6.3",
+    "version": "1.6.5",
     "lockfileVersion": 2,
     "requires": true,
     "packages": {
         "": {
             "name": "@rcsb/rcsb-molstar",
-            "version": "1.6.3",
+            "version": "1.6.5",
             "license": "MIT",
             "devDependencies": {
                 "@types/react": "^17.0.2",

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
     "name": "@rcsb/rcsb-molstar",
-    "version": "1.6.3",
+    "version": "1.6.5",
     "description": "RCSB PDB apps and props based on Mol*.",
     "homepage": "https://github.com/rcsb/rcsb-molstar#readme",
     "repository": {

+ 1 - 0
src/viewer/index.html

@@ -61,6 +61,7 @@
                 showSessionControls: !pdbId,
                 layoutShowLog: !pdbId,
                 layoutShowControls: !isEmbedded,
+                showMembraneOrientationPreset: true
             })
 
             // load pdbId or url

+ 7 - 4
src/viewer/index.ts

@@ -60,6 +60,7 @@ const DefaultViewerProps = {
     showSessionControls: false,
     showStructureSourceControls: true,
     showSuperpositionControls: true,
+    showMembraneOrientationPreset: false,
     modelUrlProviders: [
         (pdbId: string) => ({
             url: `https://models.rcsb.org/${pdbId.toLowerCase()}.bcif`,
@@ -82,7 +83,7 @@ const DefaultViewerProps = {
 
     viewportShowExpand: true,
     viewportShowSelectionMode: true,
-    volumeStreamingServer: '//maps.rcsb.org/',
+    volumeStreamingServer: 'https://maps.rcsb.org/',
 
     backgroundColor: ColorNames.white,
     showWelcomeToast: true
@@ -165,12 +166,13 @@ export class Viewer {
         this.plugin.init()
             .then(async () => {
                 // hide 'Membrane Orientation' preset from UI - has to happen 'before' react render, apparently
-                this.plugin.builders.structure.representation.unregisterPreset(MembraneOrientationPreset);
-                this.plugin.representation.structure.registry.remove(MembraneOrientationRepresentationProvider);
+                if (!o.showMembraneOrientationPreset) {
+                    this.plugin.builders.structure.representation.unregisterPreset(MembraneOrientationPreset);
+                    this.plugin.representation.structure.registry.remove(MembraneOrientationRepresentationProvider);
+                }
 
                 ReactDOM.render(React.createElement(Plugin, { plugin: this.plugin }), element);
 
-                // TODO confirm if this.plugin.canvas3d is still null
                 const renderer = this.plugin.canvas3d!.props.renderer;
                 await PluginCommands.Canvas3D.SetSettings(this.plugin, { settings: { renderer: { ...renderer, backgroundColor: o.backgroundColor } } });
                 this.plugin.representation.structure.themes.colorThemeRegistry.add(SuperposeColorThemeProvider);
@@ -223,6 +225,7 @@ export class Viewer {
                 await this.customState.modelLoader.load({ fileOrUrl: p.url, format: p.format, isBinary: p.isBinary }, props, matrix);
                 break;
             } catch (e) {
+
                 console.warn(`loading '${pdbId}' failed with '${e}', trying next model-loader-provider`);
             }
         }