Skip to content
Snippets Groups Projects
Commit 9757e970 authored by Alexander Rose's avatar Alexander Rose
Browse files

added noop to utils

parent a7cf5ca0
No related branches found
No related tags found
No related merge requests found
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
import * as React from 'react' import * as React from 'react'
import { NumericInput } from './common'; import { NumericInput } from './common';
import { noop } from 'mol-util';
export class Slider extends React.Component<{ export class Slider extends React.Component<{
min: number, min: number,
...@@ -184,9 +185,6 @@ function classNames(_classes: { [name: string]: boolean | number }) { ...@@ -184,9 +185,6 @@ function classNames(_classes: { [name: string]: boolean | number }) {
return classes.join(' '); return classes.join(' ');
} }
function noop() {
}
function isNotTouchEvent(e: TouchEvent) { function isNotTouchEvent(e: TouchEvent) {
return e.touches.length > 1 || (e.type.toLowerCase() === 'touchend' && e.touches.length > 0); return e.touches.length > 1 || (e.type.toLowerCase() === 'touchend' && e.touches.length > 0);
} }
......
...@@ -14,6 +14,8 @@ import { Progress } from 'mol-task'; ...@@ -14,6 +14,8 @@ import { Progress } from 'mol-task';
export * from './value-cell' export * from './value-cell'
export { BitFlags, StringBuilder, UUID, Mask } export { BitFlags, StringBuilder, UUID, Mask }
export const noop = function () { };
export function round(n: number, d: number) { export function round(n: number, d: number) {
let f = Math.pow(10, d) let f = Math.pow(10, d)
return Math.round(f * n) / f return Math.round(f * n) / f
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment