diff --git a/src/mol-plugin/skin/base/components/misc.scss b/src/mol-plugin/skin/base/components/misc.scss index db173d4fcd351d6081a260b76a4d5ee6def2c62f..97cb047b5a80f095da9c3f814c8414959d4b4854 100644 --- a/src/mol-plugin/skin/base/components/misc.scss +++ b/src/mol-plugin/skin/base/components/misc.scss @@ -4,17 +4,17 @@ background: $default-background; text-align: center; //font-style: italic; - - -webkit-user-select: none; /* Chrome/Safari */ + + -webkit-user-select: none; /* Chrome/Safari */ -moz-user-select: none; /* Firefox */ -ms-user-select: none; /* IE10+ */ /* Rules below not implemented in browsers yet */ -o-user-select: none; user-select: none; - + font-weight: light; - + cursor: default; } @@ -34,10 +34,10 @@ top: 0; display: table; text-align: center; - + > div { b { - font-size: 120%; + font-size: 120%; } display: table-cell; vertical-align: middle; @@ -68,6 +68,6 @@ display: block; } -.msp-contols-section { +.msp-controls-section { margin-bottom: $control-spacing; } \ No newline at end of file diff --git a/src/mol-plugin/ui/plugin.tsx b/src/mol-plugin/ui/plugin.tsx index 26413e9acf8a9b45bfdf4c8b369e97d5779e5444..f1c36001acb3bd6b8e96edd92c6a076edef761f9 100644 --- a/src/mol-plugin/ui/plugin.tsx +++ b/src/mol-plugin/ui/plugin.tsx @@ -19,7 +19,7 @@ import { StateTree } from './state/tree'; import { BackgroundTaskProgress } from './task'; import { Viewport, ViewportControls } from './viewport'; import { StateTransform } from '../../mol-state'; -import { UpdateTransformContol } from './state/update-transform'; +import { UpdateTransformControl } from './state/update-transform'; export class Plugin extends React.Component<{ plugin: PluginContext }, {}> { @@ -227,7 +227,7 @@ export class CurrentObject extends PluginUIComponent { if (!showActions) return null; return <> - {(cell.status === 'ok' || cell.status === 'error') && <UpdateTransformContol state={current.state} transform={transform} /> } + {(cell.status === 'ok' || cell.status === 'error') && <UpdateTransformControl state={current.state} transform={transform} /> } {cell.status === 'ok' && <StateObjectActions state={current.state} nodeRef={ref} initiallyColapsed />} </>; } diff --git a/src/mol-plugin/ui/state/actions.tsx b/src/mol-plugin/ui/state/actions.tsx index bdd186f2a933e602441ec130381b99d436967c6a..5f82d6db8a845daec5dce04f104cd4cc5808c723 100644 --- a/src/mol-plugin/ui/state/actions.tsx +++ b/src/mol-plugin/ui/state/actions.tsx @@ -6,7 +6,7 @@ import * as React from 'react'; import { PluginUIComponent } from '../base'; -import { ApplyActionContol } from './apply-action'; +import { ApplyActionControl } from './apply-action'; import { State } from '../../../mol-state'; import { Icon } from '../controls/common'; @@ -38,7 +38,7 @@ export class StateObjectActions extends PluginUIComponent<{ state: State, nodeRe return <div className='msp-state-actions'> {!this.props.hideHeader && <div className='msp-section-header'><Icon name='code' /> {`Actions (${display})`}</div> } - {actions.map((act, i) => <ApplyActionContol plugin={this.plugin} key={`${act.id}`} state={state} action={act} nodeRef={ref} initiallyCollapsed={this.props.initiallyColapsed} />)} + {actions.map((act, i) => <ApplyActionControl plugin={this.plugin} key={`${act.id}`} state={state} action={act} nodeRef={ref} initiallyCollapsed={this.props.initiallyColapsed} />)} </div>; } } \ No newline at end of file diff --git a/src/mol-plugin/ui/state/animation.tsx b/src/mol-plugin/ui/state/animation.tsx index e4cd317b493fce9af3e64c9f8e4ed07959cca64b..aa0f25ce13d397f327ebbe12a1ae5f2263b59b74 100644 --- a/src/mol-plugin/ui/state/animation.tsx +++ b/src/mol-plugin/ui/state/animation.tsx @@ -13,7 +13,7 @@ export class AnimationControlsWrapper extends PluginUIComponent<{ }> { render() { const anim = this.plugin.state.animation; if (anim.isEmpty) return null; - return <div className='msp-contols-section'> + return <div className='msp-controls-section'> <div className='msp-section-header'><Icon name='code' /> Animations</div> <AnimationControls /> </div> diff --git a/src/mol-plugin/ui/state/apply-action.tsx b/src/mol-plugin/ui/state/apply-action.tsx index e53e6aa9fd735d273925d29bc94ea21ee2eb0d26..fe4dfd1fc4021f2e0faed6e0068a40952b618700 100644 --- a/src/mol-plugin/ui/state/apply-action.tsx +++ b/src/mol-plugin/ui/state/apply-action.tsx @@ -8,12 +8,12 @@ import { PluginCommands } from '../../../mol-plugin/command'; import { PluginContext } from '../../../mol-plugin/context'; import { State, StateTransform, StateAction } from '../../../mol-state'; import { memoizeLatest } from '../../../mol-util/memoize'; -import { StateTransformParameters, TransformContolBase } from './common'; +import { StateTransformParameters, TransformControlBase } from './common'; import { ParamDefinition as PD } from '../../../mol-util/param-definition'; -export { ApplyActionContol }; +export { ApplyActionControl }; -namespace ApplyActionContol { +namespace ApplyActionControl { export interface Props { plugin: PluginContext, nodeRef: StateTransform.Ref, @@ -32,7 +32,7 @@ namespace ApplyActionContol { } } -class ApplyActionContol extends TransformContolBase<ApplyActionContol.Props, ApplyActionContol.ComponentState> { +class ApplyActionControl extends TransformControlBase<ApplyActionControl.Props, ApplyActionControl.ComponentState> { applyAction() { return PluginCommands.State.ApplyAction.dispatch(this.plugin, { state: this.props.state, @@ -53,7 +53,7 @@ class ApplyActionContol extends TransformContolBase<ApplyActionContol.Props, App state = { ref: this.props.nodeRef, version: this.props.state.transforms.get(this.props.nodeRef).version, error: void 0, isInitial: true, params: this.getInfo().initialValues, busy: false, isCollapsed: this.props.initiallyCollapsed }; - static getDerivedStateFromProps(props: ApplyActionContol.Props, state: ApplyActionContol.ComponentState) { + static getDerivedStateFromProps(props: ApplyActionControl.Props, state: ApplyActionControl.ComponentState) { if (props.nodeRef === state.ref) return null; const version = props.state.transforms.get(props.nodeRef).version; if (version === state.version) return null; @@ -63,7 +63,7 @@ class ApplyActionContol extends TransformContolBase<ApplyActionContol.Props, App ? PD.getDefaultValues(props.action.definition.params(source, props.plugin)) : { }; - const newState: Partial<ApplyActionContol.ComponentState> = { + const newState: Partial<ApplyActionControl.ComponentState> = { ref: props.nodeRef, version, params, diff --git a/src/mol-plugin/ui/state/common.tsx b/src/mol-plugin/ui/state/common.tsx index 5dc1bc71aaadeaaed011ddb5f4fe384128ea98ef..bce39c8bd1877a52fe4df1dd5ca6793f0433875a 100644 --- a/src/mol-plugin/ui/state/common.tsx +++ b/src/mol-plugin/ui/state/common.tsx @@ -13,7 +13,7 @@ import { ParamDefinition as PD } from '../../../mol-util/param-definition'; import { Subject } from 'rxjs'; import { Icon } from '../controls/common'; -export { StateTransformParameters, TransformContolBase }; +export { StateTransformParameters, TransformControlBase }; class StateTransformParameters extends PurePluginUIComponent<StateTransformParameters.Props> { validate(params: any) { @@ -89,7 +89,7 @@ namespace StateTransformParameters { } } -namespace TransformContolBase { +namespace TransformControlBase { export interface ComponentState { params: any, error?: string, @@ -99,7 +99,7 @@ namespace TransformContolBase { } } -abstract class TransformContolBase<P, S extends TransformContolBase.ComponentState> extends PurePluginUIComponent<P, S> { +abstract class TransformControlBase<P, S extends TransformControlBase.ComponentState> extends PurePluginUIComponent<P, S> { abstract applyAction(): Promise<void>; abstract getInfo(): StateTransformParameters.Props['info']; abstract getHeader(): StateTransformer.Definition['display']; diff --git a/src/mol-plugin/ui/state/update-transform.tsx b/src/mol-plugin/ui/state/update-transform.tsx index 7aafc25eaeffdb5b0feef2a746537fbadf263f15..f9fb6bb9addb9d819962812f9fea84f5d6fd56a5 100644 --- a/src/mol-plugin/ui/state/update-transform.tsx +++ b/src/mol-plugin/ui/state/update-transform.tsx @@ -6,14 +6,14 @@ import { State, StateTransform, StateTransformer } from '../../../mol-state'; import { memoizeLatest } from '../../../mol-util/memoize'; -import { StateTransformParameters, TransformContolBase } from './common'; +import { StateTransformParameters, TransformControlBase } from './common'; import { Observable } from 'rxjs'; import * as React from 'react'; import { PluginUIComponent } from '../base'; -export { UpdateTransformContol, TransformUpdaterControl }; +export { UpdateTransformControl, TransformUpdaterControl }; -namespace UpdateTransformContol { +namespace UpdateTransformControl { export interface Props { transform: StateTransform, state: State, @@ -22,12 +22,12 @@ namespace UpdateTransformContol { customHeader?: StateTransformer.Definition['display'] } - export interface ComponentState extends TransformContolBase.ComponentState { + export interface ComponentState extends TransformControlBase.ComponentState { transform: StateTransform } } -class UpdateTransformContol extends TransformContolBase<UpdateTransformContol.Props, UpdateTransformContol.ComponentState> { +class UpdateTransformControl extends TransformControlBase<UpdateTransformControl.Props, UpdateTransformControl.ComponentState> { applyAction() { return this.plugin.updateTransform(this.props.state, this.props.transform.ref, this.state.params); } getInfo() { return this._getInfo(this.props.transform); } getTransformerId() { return this.props.transform.transformer.id; } @@ -70,12 +70,12 @@ class UpdateTransformContol extends TransformContolBase<UpdateTransformContol.Pr private _getInfo = memoizeLatest((t: StateTransform) => StateTransformParameters.infoFromTransform(this.plugin, this.props.state, t)); - state: UpdateTransformContol.ComponentState = { transform: this.props.transform, error: void 0, isInitial: true, params: this.getInfo().initialValues, busy: false, isCollapsed: this.props.initiallyCollapsed }; + state: UpdateTransformControl.ComponentState = { transform: this.props.transform, error: void 0, isInitial: true, params: this.getInfo().initialValues, busy: false, isCollapsed: this.props.initiallyCollapsed }; - static getDerivedStateFromProps(props: UpdateTransformContol.Props, state: UpdateTransformContol.ComponentState) { + static getDerivedStateFromProps(props: UpdateTransformControl.Props, state: UpdateTransformControl.ComponentState) { if (props.transform === state.transform) return null; const cell = props.state.cells.get(props.transform.ref)!; - const newState: Partial<UpdateTransformContol.ComponentState> = { + const newState: Partial<UpdateTransformControl.ComponentState> = { transform: props.transform, params: (cell.params && cell.params.values) || { }, isInitial: true, @@ -101,6 +101,6 @@ class TransformUpdaterControl extends PluginUIComponent<{ nodeRef: string, initi if (!cell || (cell.status !== 'ok' && cell.status !== 'error')) return null; const transform = cell.transform; - return <UpdateTransformContol state={state} transform={transform} initiallyCollapsed={this.props.initiallyCollapsed} customHeader={this.props.header} />; + return <UpdateTransformControl state={state} transform={transform} initiallyCollapsed={this.props.initiallyCollapsed} customHeader={this.props.header} />; } } \ No newline at end of file