any-touch
Advanced tools
Comparing version 0.0.22 to 0.0.24
@@ -0,1 +1,32 @@ | ||
# Change Log | ||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. | ||
## [0.0.24](https://github.com/383514580/a-touch/compare/v0.0.23...v0.0.24) (2019-01-20) | ||
# Change Log | ||
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. | ||
## 0.0.23 (2019-01-20) | ||
### Bug Fixes | ||
* package.json增加types字段 ([fb352eb](https://github.com/383514580/a-touch/commit/fb352eb)) | ||
* 修复"即时方向"错误 ([b41797d](https://github.com/383514580/a-touch/commit/b41797d)) | ||
* 修复"即时方向"错误 ([ea51838](https://github.com/383514580/a-touch/commit/ea51838)) | ||
* 修复bundlephobia计算不到尺寸的问题 ([e88c404](https://github.com/383514580/a-touch/commit/e88c404)) | ||
* 修复off方法错误 ([4c358b1](https://github.com/383514580/a-touch/commit/4c358b1)) | ||
* 修复pan对directions的限制失效问题 ([bad1caa](https://github.com/383514580/a-touch/commit/bad1caa)) | ||
* 修复press会触发多次的错误 ([b3640af](https://github.com/383514580/a-touch/commit/b3640af)) | ||
* 修复swipe不触发 ([a0c171a](https://github.com/383514580/a-touch/commit/a0c171a)) | ||
* 对add方法内部增加update, 以便相应识别新加识别器上touchaction的变化 ([2ae1ca9](https://github.com/383514580/a-touch/commit/2ae1ca9)) | ||
* 解决rollup不解析commonjs格式的包 ([18cb8aa](https://github.com/383514580/a-touch/commit/18cb8aa)) | ||
* 识别器用set方法不再触发anyTouch的绑定事件, 发布0.0.12 ([922ad87](https://github.com/383514580/a-touch/commit/922ad87)) | ||
####[v0.0.2] | ||
@@ -2,0 +33,0 @@ - 支持destory |
@@ -768,4 +768,6 @@ 'use strict'; | ||
} | ||
else if ((STATUS_START === this.status || STATUS_MOVE === this.status) && INPUT_CANCEL === inputStatus || !isVaild) { | ||
else if ((STATUS_START === this.status || STATUS_MOVE === this.status) && INPUT_CANCEL === inputStatus) { | ||
this.status = STATUS_CANCELLED; | ||
this.emit(this.options.name + 'cancel', computed); | ||
return; | ||
} | ||
@@ -772,0 +774,0 @@ this.isRecognized = -1 < [STATUS_START, STATUS_MOVE, STATUS_END, STATUS_RECOGNIZED].indexOf(this.status); |
@@ -766,4 +766,6 @@ /*! ***************************************************************************** | ||
} | ||
else if ((STATUS_START === this.status || STATUS_MOVE === this.status) && INPUT_CANCEL === inputStatus || !isVaild) { | ||
else if ((STATUS_START === this.status || STATUS_MOVE === this.status) && INPUT_CANCEL === inputStatus) { | ||
this.status = STATUS_CANCELLED; | ||
this.emit(this.options.name + 'cancel', computed); | ||
return; | ||
} | ||
@@ -770,0 +772,0 @@ this.isRecognized = -1 < [STATUS_START, STATUS_MOVE, STATUS_END, STATUS_RECOGNIZED].indexOf(this.status); |
@@ -772,4 +772,6 @@ (function (global, factory) { | ||
} | ||
else if ((STATUS_START === this.status || STATUS_MOVE === this.status) && INPUT_CANCEL === inputStatus || !isVaild) { | ||
else if ((STATUS_START === this.status || STATUS_MOVE === this.status) && INPUT_CANCEL === inputStatus) { | ||
this.status = STATUS_CANCELLED; | ||
this.emit(this.options.name + 'cancel', computed); | ||
return; | ||
} | ||
@@ -776,0 +778,0 @@ this.isRecognized = -1 < [STATUS_START, STATUS_MOVE, STATUS_END, STATUS_RECOGNIZED].indexOf(this.status); |
@@ -0,0 +0,0 @@ export default function ({ startV, prevV, activeV }: any): { |
@@ -0,0 +0,0 @@ import { getAngle } from '../vector'; |
@@ -0,0 +0,0 @@ export default function ({ prevInput, input }: any): { |
@@ -0,0 +0,0 @@ import { radianToAngle } from '../vector'; |
export default function ({ startInput, input }: any): any; |
@@ -0,0 +0,0 @@ var prevDisplacementX = 0; |
@@ -0,0 +0,0 @@ import { Input } from '../interface'; |
@@ -0,0 +0,0 @@ import { COMPUTE_INTERVAL, INPUT_CANCEL } from '../const'; |
import { Input } from '../interface'; | ||
declare const _default: ({ pointerLength, isFirst, isFinal }: Input) => number; | ||
export default _default; |
@@ -0,0 +0,0 @@ var maxLength = 0; |
@@ -0,0 +0,0 @@ export default function ({ startV, prevV, activeV }: any): { |
@@ -0,0 +0,0 @@ import { getVLength } from '../vector'; |
@@ -0,0 +0,0 @@ declare const _default: (input: any) => { |
@@ -0,0 +0,0 @@ import { propX, propY } from '../const'; |
import { Computed } from '../interface'; | ||
export default function ({ startInput, prevInput, startMutliInput, input }: any): Computed; |
@@ -0,0 +0,0 @@ var __assign = (this && this.__assign) || function () { |
@@ -0,0 +0,0 @@ export declare const MOBILE_REGEX: RegExp; |
@@ -0,0 +0,0 @@ export var MOBILE_REGEX = /mobile|tablet|ip(ad|hone|od)|android/i; |
@@ -0,0 +0,0 @@ export declare const STATUS_POSSIBLE = "possible"; |
@@ -0,0 +0,0 @@ export var STATUS_POSSIBLE = 'possible'; |
declare const _default: (event: MouseEvent) => any; | ||
export default _default; |
@@ -0,0 +0,0 @@ var prevPointers = undefined; |
declare const _default: (event: TouchEvent) => any; | ||
export default _default; |
@@ -0,0 +0,0 @@ export default (function (event) { |
import { Input } from '../interface'; | ||
declare const _default: (event: MouseEvent | TouchEvent) => Input; | ||
export default _default; |
@@ -0,0 +0,0 @@ var __assign = (this && this.__assign) || function () { |
declare const _default: (event: MouseEvent | TouchEvent) => any; | ||
export default _default; |
@@ -0,0 +0,0 @@ import createInput from './input/create'; |
@@ -0,0 +0,0 @@ import { EventHandler } from './interface'; |
@@ -0,0 +0,0 @@ var __assign = (this && this.__assign) || function () { |
@@ -0,0 +0,0 @@ import { Computed } from '../interface'; |
@@ -165,4 +165,6 @@ var __assign = (this && this.__assign) || function () { | ||
} | ||
else if ((STATUS_START === this.status || STATUS_MOVE === this.status) && INPUT_CANCEL === inputStatus || !isVaild) { | ||
else if ((STATUS_START === this.status || STATUS_MOVE === this.status) && INPUT_CANCEL === inputStatus) { | ||
this.status = STATUS_CANCELLED; | ||
this.emit(this.options.name + 'cancel', computed); | ||
return; | ||
} | ||
@@ -169,0 +171,0 @@ this.isRecognized = -1 < [STATUS_START, STATUS_MOVE, STATUS_END, STATUS_RECOGNIZED].indexOf(this.status); |
@@ -0,0 +0,0 @@ import { Computed, directionString } from '../interface'; |
@@ -0,0 +0,0 @@ var __extends = (this && this.__extends) || (function () { |
@@ -0,0 +0,0 @@ import { Computed } from '../interface'; |
@@ -0,0 +0,0 @@ var __extends = (this && this.__extends) || (function () { |
@@ -0,0 +0,0 @@ import { Computed } from '../interface'; |
@@ -0,0 +0,0 @@ var __extends = (this && this.__extends) || (function () { |
@@ -0,0 +0,0 @@ import Base from './Base'; |
@@ -0,0 +0,0 @@ var __extends = (this && this.__extends) || (function () { |
@@ -0,0 +0,0 @@ import Recognizer from './Base'; |
@@ -0,0 +0,0 @@ var __extends = (this && this.__extends) || (function () { |
@@ -0,0 +0,0 @@ import { Computed } from '../interface'; |
@@ -0,0 +0,0 @@ var __extends = (this && this.__extends) || (function () { |
declare const _default: (touchActions: string[]) => string; | ||
export default _default; |
@@ -0,0 +0,0 @@ var __values = (this && this.__values) || function (o) { |
@@ -0,0 +0,0 @@ import { directionString } from '../interface'; |
@@ -0,0 +0,0 @@ var __values = (this && this.__values) || function (o) { |
@@ -0,0 +0,0 @@ import { Vector } from './interface'; |
@@ -0,0 +0,0 @@ import { propX, propY } from './const'; |
{ | ||
"name": "any-touch", | ||
"version": "0.0.22", | ||
"version": "0.0.24", | ||
"description": "一个手势库", | ||
@@ -23,3 +23,5 @@ "unpkg": "dist/AnyTouch.umd.js", | ||
"demo": "node ./script/demo.js", | ||
"removeAll": "rimraf ./node_modules" | ||
"removeAll": "rimraf ./node_modules", | ||
"commit": "git-cz", | ||
"version": "standard-version" | ||
}, | ||
@@ -39,2 +41,4 @@ "repository": { | ||
"chalk": "^2.4.2", | ||
"commitizen": "^3.0.5", | ||
"cz-conventional-changelog": "^2.1.0", | ||
"gh-pages": "^2.0.1", | ||
@@ -50,2 +54,3 @@ "jest": "^23.6.0", | ||
"shelljs": "^0.8.3", | ||
"standard-version": "^4.4.0", | ||
"ts-jest": "^23.10.4", | ||
@@ -57,3 +62,8 @@ "tslib": "^1.9.3", | ||
"any-event": "^0.3.4" | ||
}, | ||
"config": { | ||
"commitizen": { | ||
"path": "./node_modules/cz-conventional-changelog" | ||
} | ||
} | ||
} |
@@ -0,0 +0,0 @@ # any-touch [![NPM Version][npm-image]][npm-url] [![NPM Downloads][downloads-image]][downloads-url] [![npm bundle size (minified + gzip)][size-image]][size-url] [![codecov](https://codecov.io/gh/383514580/any-touch/branch/develop/graph/badge.svg)](https://codecov.io/gh/383514580/any-touch) [![CircleCI](https://circleci.com/gh/383514580/any-touch.svg?style=svg)](https://circleci.com/gh/383514580/any-touch) |
@@ -0,0 +0,0 @@ import { getAngle } from '../vector'; |
@@ -0,0 +0,0 @@ import { radianToAngle } from '../vector'; |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ // 返回最近一个时间段的计算结果 |
@@ -0,0 +0,0 @@ import { Input } from '../interface'; |
@@ -0,0 +0,0 @@ import { getVLength } from '../vector'; |
@@ -0,0 +0,0 @@ import { propX, propY } from '../const'; |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ // 简单判断是否手机设备 |
@@ -0,0 +0,0 @@ export const DIRECTION_UP = 0; |
@@ -0,0 +0,0 @@ // 识别器状态码 |
@@ -0,0 +0,0 @@ // 事件的回调 |
@@ -0,0 +0,0 @@ let prevPointers: any[] = undefined; |
@@ -0,0 +0,0 @@ export default (event: TouchEvent): any => { |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ import { Input } from './interface'; |
@@ -0,0 +0,0 @@ |
@@ -0,0 +0,0 @@ /** |
@@ -209,5 +209,10 @@ /* | ||
this.status = STATUS_END; | ||
} else if ((STATUS_START === this.status || STATUS_MOVE === this.status) && INPUT_CANCEL === inputStatus || !isVaild) { | ||
} else if ((STATUS_START === this.status || STATUS_MOVE === this.status) && INPUT_CANCEL === inputStatus) { | ||
this.status = STATUS_CANCELLED; | ||
this.emit(this.options.name+'cancel', computed); | ||
return; | ||
} | ||
// console.log( | ||
@@ -214,0 +219,0 @@ // `%c ${this.options.name} `, 'background-color:#66c;color:#fff;', |
@@ -84,6 +84,2 @@ import { Computed, directionString } from '../interface'; | ||
}; | ||
}; | ||
@@ -90,0 +86,0 @@ |
@@ -0,0 +0,0 @@ import { Computed } from '../interface'; |
@@ -0,0 +0,0 @@ import { Computed } from '../interface'; |
@@ -0,0 +0,0 @@ import Base from './Base'; |
@@ -0,0 +0,0 @@ import Recognizer from './Base'; |
@@ -0,0 +0,0 @@ import { Computed } from '../interface'; |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ export default (touchActions: string[]): string => { |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ import { Vector } from './interface'; |
@@ -0,0 +0,0 @@ interface Options { |
export interface Options { [propName: string]: any, disabled?: boolean, name?: string } |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
308229
114
6900
18
1