Ver Fonte

Proteopedia wrapper

David Sehnal há 6 anos atrás
pai
commit
ea77062d9f

+ 8 - 0
src/examples/proteopedia-wrapper/changelog.md

@@ -1,3 +1,11 @@
+== v3.0 ==
+
+* Fixed initial camera zoom.
+* Custom chain coloring.
+* Customize visualizations.
+* Show ligand list.
+* Show 3D-SNFG.
+
 == v2.0 ==
 
 * Changed how state saving works.

+ 1 - 1
src/examples/proteopedia-wrapper/index.html

@@ -119,7 +119,7 @@
             addControl('Show 3DSNFG', () => PluginWrapper.updateStyle({ snfg3d: { hide: false } }, true));
 
             addControl('Hide Water', () => PluginWrapper.updateStyle({ water: { hide: true } }, true));
-            addControl('Show Water', () => PluginWrapper.updateStyle({ water: { } }, true));
+            addControl('Show Water', () => PluginWrapper.updateStyle({ water: { hide: false } }, true));
 
             addSeparator();
 

+ 4 - 5
src/examples/proteopedia-wrapper/index.ts

@@ -32,7 +32,7 @@ import { ColorNames } from 'mol-util/color/tables';
 require('mol-plugin/skin/light.scss')
 
 class MolStarProteopediaWrapper {
-    static VERSION_MAJOR = 2;
+    static VERSION_MAJOR = 3;
     static VERSION_MINOR = 0;
 
     private _ev = RxEventHelper.create();
@@ -153,12 +153,11 @@ class MolStarProteopediaWrapper {
         }
 
         if (!partial || (partial && style.water)) {
-            const root = update.to(StateElements.Het);
+            const root = update.to(StateElements.Water);
             if (style.water && style.water.hide) {
-                root.delete(StateElements.Water);
+                root.delete(StateElements.WaterVisual);
             } else {
-                root.applyOrUpdate(StateElements.Water, StateTransforms.Model.StructureComplexElement, { type: 'water' })
-                    .applyOrUpdate(StateElements.WaterVisual, StateTransforms.Representation.StructureRepresentation3D,
+                root.applyOrUpdate(StateElements.WaterVisual, StateTransforms.Representation.StructureRepresentation3D,
                         StructureRepresentation3DHelpers.getDefaultParamsWithTheme(this.plugin,
                             (style.water && style.water.kind) || 'ball-and-stick',
                             (style.water && style.water.coloring), structure, { alpha: 0.51 }));