js: draggable deprecated & add touch api

This commit is contained in:
王劲鹏
2021-09-22 15:30:08 +08:00
committed by osborn
parent 1f0721af2e
commit 8ad5c06ff7
12 changed files with 210 additions and 2 deletions

View File

@@ -3256,6 +3256,9 @@ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators,
var __metadata$2 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") { return Reflect.metadata(k, v); }
};
/**
* @deprecated The class should not be used, please use GestureContainer class instead
*/
var Draggable = /** @class */ (function (_super) {
__extends$4(Draggable, _super);
function Draggable() {
@@ -3267,6 +3270,9 @@ var Draggable = /** @class */ (function (_super) {
], Draggable.prototype, "onDrag", void 0);
return Draggable;
}(Stack));
/**
* @deprecated The function should not be used, please use gestureContainer function instead
*/
function draggable(views, config) {
var ret = new Draggable;
ret.layoutConfig = layoutConfig().fit();
@@ -3408,6 +3414,22 @@ var GestureContainer = /** @class */ (function (_super) {
Property,
__metadata("design:type", Function)
], GestureContainer.prototype, "onSwipe", void 0);
__decorate([
Property,
__metadata("design:type", Function)
], GestureContainer.prototype, "onTouchDown", void 0);
__decorate([
Property,
__metadata("design:type", Function)
], GestureContainer.prototype, "onTouchMove", void 0);
__decorate([
Property,
__metadata("design:type", Function)
], GestureContainer.prototype, "onTouchUp", void 0);
__decorate([
Property,
__metadata("design:type", Function)
], GestureContainer.prototype, "onTouchCancel", void 0);
return GestureContainer;
}(Stack));
function gestureContainer(views, config) {

View File

@@ -2473,12 +2473,18 @@ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators,
var __metadata$2 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
/**
* @deprecated The class should not be used, please use GestureContainer class instead
*/
class Draggable extends Stack {
}
__decorate$2([
Property,
__metadata$2("design:type", Function)
], Draggable.prototype, "onDrag", void 0);
/**
* @deprecated The function should not be used, please use gestureContainer function instead
*/
function draggable(views, config) {
const ret = new Draggable;
ret.layoutConfig = layoutConfig().fit();
@@ -2582,6 +2588,22 @@ __decorate([
Property,
__metadata("design:type", Function)
], GestureContainer.prototype, "onSwipe", void 0);
__decorate([
Property,
__metadata("design:type", Function)
], GestureContainer.prototype, "onTouchDown", void 0);
__decorate([
Property,
__metadata("design:type", Function)
], GestureContainer.prototype, "onTouchMove", void 0);
__decorate([
Property,
__metadata("design:type", Function)
], GestureContainer.prototype, "onTouchUp", void 0);
__decorate([
Property,
__metadata("design:type", Function)
], GestureContainer.prototype, "onTouchCancel", void 0);
function gestureContainer(views, config) {
const ret = new GestureContainer;
ret.layoutConfig = layoutConfig().fit();

View File

@@ -3994,12 +3994,18 @@ var __decorate$2 = (undefined && undefined.__decorate) || function (decorators,
var __metadata$2 = (undefined && undefined.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
/**
* @deprecated The class should not be used, please use GestureContainer class instead
*/
class Draggable extends Stack {
}
__decorate$2([
Property,
__metadata$2("design:type", Function)
], Draggable.prototype, "onDrag", void 0);
/**
* @deprecated The function should not be used, please use gestureContainer function instead
*/
function draggable(views, config) {
const ret = new Draggable;
ret.layoutConfig = layoutConfig().fit();
@@ -4103,6 +4109,22 @@ __decorate([
Property,
__metadata("design:type", Function)
], GestureContainer.prototype, "onSwipe", void 0);
__decorate([
Property,
__metadata("design:type", Function)
], GestureContainer.prototype, "onTouchDown", void 0);
__decorate([
Property,
__metadata("design:type", Function)
], GestureContainer.prototype, "onTouchMove", void 0);
__decorate([
Property,
__metadata("design:type", Function)
], GestureContainer.prototype, "onTouchUp", void 0);
__decorate([
Property,
__metadata("design:type", Function)
], GestureContainer.prototype, "onTouchCancel", void 0);
function gestureContainer(views, config) {
const ret = new GestureContainer;
ret.layoutConfig = layoutConfig().fit();