소스 검색

show helpful toast message for density preset

JonStargaryen 4 년 전
부모
커밋
3b48b26e32
1개의 변경된 파일8개의 추가작업 그리고 0개의 파일을 삭제
  1. 8 0
      src/viewer/helpers/preset.ts

+ 8 - 0
src/viewer/helpers/preset.ts

@@ -20,6 +20,7 @@ import { InitVolumeStreaming } from 'molstar/lib/mol-plugin/behavior/dynamic/vol
 import { ViewerState } from '../types';
 import { StateSelection } from 'molstar/lib/mol-state';
 import { VolumeStreaming } from 'molstar/lib/mol-plugin/behavior/dynamic/volume-streaming/behavior';
+import { PluginCommands } from 'molstar/lib/mol-plugin/commands';
 
 type Target = {
     readonly auth_seq_id?: number
@@ -165,6 +166,13 @@ export const RcsbPreset = TrajectoryHierarchyPresetProvider({
                 ...ViewerState(plugin).collapsed.value,
                 volume: false
             })
+
+            await PluginCommands.Toast.Show(plugin, {
+                title: 'Electron Density',
+                message: 'Click on a residue display electron density, click background to reset.',
+                key: 'toast-density',
+                timeoutMs: 60000
+            })
         }
 
         return {