Skip to content
Snippets Groups Projects
Select Git revision
  • f8284508e1703722f82b49fd9e67bf9f4fb79add
  • master default protected
  • rednatco-v2
  • rednatco
  • test
  • ntc-tube-uniform-color
  • ntc-tube-missing-atoms
  • restore-vertex-array-per-program
  • watlas2
  • dnatco_new
  • cleanup-old-nodejs
  • webmmb
  • fix_auth_seq_id
  • update_deps
  • ext_dev
  • ntc_balls
  • nci-2
  • plugin
  • bugfix-0.4.5
  • nci
  • servers
  • v0.5.0-dev.1
  • v0.4.5
  • v0.4.4
  • v0.4.3
  • v0.4.2
  • v0.4.1
  • v0.4.0
  • v0.3.12
  • v0.3.11
  • v0.3.10
  • v0.3.9
  • v0.3.8
  • v0.3.7
  • v0.3.6
  • v0.3.5
  • v0.3.4
  • v0.3.3
  • v0.3.2
  • v0.3.1
  • v0.3.0
41 results

long_animation.sdf

Blame
  • spec.ts 1.80 KiB
    /**
     * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info.
     *
     * @author David Sehnal <david.sehnal@gmail.com>
     */
    
    import { StateTransformer, StateAction } from 'mol-state';
    import { StateTransformParameters } from './ui/state/common';
    import { PluginLayoutStateProps } from './layout';
    import { PluginStateAnimation } from './state/animation/model';
    
    export { PluginSpec }
    
    interface PluginSpec {
        actions: PluginSpec.Action[],
        behaviors: PluginSpec.Behavior[],
        animations?: PluginStateAnimation[],
        customParamEditors?: [StateAction | StateTransformer, StateTransformParameters.Class][],
        layout?: {
            initial?: PluginLayoutStateProps,
            controls?: {
                left?: React.ComponentClass | 'none',
                right?: React.ComponentClass | 'none',
                bottom?: React.ComponentClass | 'none'
            }
        }
    }
    
    namespace PluginSpec {
        export interface Action {
            action: StateAction | StateTransformer,
            customControl?: StateTransformParameters.Class,
            autoUpdate?: boolean
        }
    
        export function Action(action: StateAction | StateTransformer, params?: { customControl?: StateTransformParameters.Class, autoUpdate?: boolean }): Action {
            return { action, customControl: params && params.customControl, autoUpdate: params && params.autoUpdate };
        }
    
        export interface Behavior {
            transformer: StateTransformer,
            defaultParams?: any
        }
    
        export function Behavior<T extends StateTransformer>(transformer: T, defaultParams?: StateTransformer.Params<T>): Behavior {
            return { transformer, defaultParams };
        }
    
        export interface LayoutControls {
            left?: React.ComponentClass | 'none',
            right?: React.ComponentClass | 'none',
            bottom?: React.ComponentClass | 'none'
        }
    }