js: add flowlayout drag declaration

This commit is contained in:
王劲鹏
2022-08-25 10:52:01 +08:00
committed by osborn
parent 55efff976a
commit be6a0cd64c
7 changed files with 84 additions and 0 deletions

View File

@@ -37,6 +37,10 @@ export declare class FlowLayout extends Superview {
* Take effect only on iOS
*/
bounces?: boolean;
canDrag?: boolean;
beforeDragging?: (from: number) => void;
onDragging?: (from: number, to: number) => void;
onDragged?: (from: number, to: number) => void;
/**
* @param context
* @returns Returns array of visible view's index.

View File

@@ -147,6 +147,22 @@ __decorate([
Property,
__metadata("design:type", Boolean)
], FlowLayout.prototype, "bounces", void 0);
__decorate([
Property,
__metadata("design:type", Boolean)
], FlowLayout.prototype, "canDrag", void 0);
__decorate([
Property,
__metadata("design:type", Function)
], FlowLayout.prototype, "beforeDragging", void 0);
__decorate([
Property,
__metadata("design:type", Function)
], FlowLayout.prototype, "onDragging", void 0);
__decorate([
Property,
__metadata("design:type", Function)
], FlowLayout.prototype, "onDragged", void 0);
export function flowlayout(config) {
const ret = new FlowLayout;
for (let key in config) {