Skip to content
Snippets Groups Projects
Select Git revision
  • envri-hub-new-aai
  • master default protected
  • e-infra2
  • ci-megalinter-speedup
  • egi-fixes
  • e-infra
  • egi-b2drop-no-collapse
  • lfs
  • gpu_staging
  • resurrect-testing-ownloud
  • experiments/collab
  • update_claim_group_keys
  • envri-hub
  • enable_rtc
  • eosc-ui
  • future/jupyterhub-5.x
  • versioning
  • eosc-templating
  • staging1-raw-image
  • token-exchange
20 results

.editorconfig

Blame
  • list.ts 961 B
    /*
     * Copyright (c) 2018 mol* contributors, licensed under MIT, See LICENSE file for more info.
     *
     * Adapted from LiteMol
     * Copyright (c) 2016 - now David Sehnal, licensed under Apache 2.0, See LICENSE file for more info.
     */
    
    import { Context } from '../../context/context'
    import { Controller } from '../controller';
    import { AnyTransform } from 'mol-view/state/transform';
    import { AnyEntity } from 'mol-view/state/entity';
    
    export interface TransformListState {
        entity?: AnyEntity
        transforms: AnyTransform[]
    }
    
    export class TransformListController extends Controller<TransformListState> {
        constructor(context: Context) {
            super(context, { transforms: [], entity: undefined });
    
            context.currentTransforms.subscribe((transforms) => {
                this.state.next({ transforms, entity: context.currentEntity.getValue() }) // TODO
                this.setState({ transforms, entity: context.currentEntity.getValue() })
            })
        }
    }