浏览代码

added noop to utils

Alexander Rose 6 年之前
父节点
当前提交
9757e970ee
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 1 3
      src/mol-plugin/ui/controls/slider.tsx
  2. 2 0
      src/mol-util/index.ts

+ 1 - 3
src/mol-plugin/ui/controls/slider.tsx

@@ -6,6 +6,7 @@
 
 import * as React from 'react'
 import { NumericInput } from './common';
+import { noop } from 'mol-util';
 
 export class Slider extends React.Component<{
     min: number,
@@ -184,9 +185,6 @@ function classNames(_classes: { [name: string]: boolean | number }) {
     return classes.join(' ');
 }
 
-function noop() {
-}
-
 function isNotTouchEvent(e: TouchEvent) {
     return e.touches.length > 1 || (e.type.toLowerCase() === 'touchend' && e.touches.length > 0);
 }

+ 2 - 0
src/mol-util/index.ts

@@ -14,6 +14,8 @@ import { Progress } from 'mol-task';
 export * from './value-cell'
 export { BitFlags, StringBuilder, UUID, Mask }
 
+export const noop = function () { };
+
 export function round(n: number, d: number) {
     let f = Math.pow(10, d)
     return Math.round(f * n) / f