js: update beforeDragging & add itemCanDrag
This commit is contained in:
parent
3a28941c04
commit
13c151a9e4
@ -2586,6 +2586,10 @@ var List = /** @class */ (function (_super) {
|
||||
Property,
|
||||
__metadata$b("design:type", Boolean)
|
||||
], List.prototype, "canDrag", void 0);
|
||||
__decorate$b([
|
||||
Property,
|
||||
__metadata$b("design:type", Function)
|
||||
], List.prototype, "itemCanDrag", void 0);
|
||||
__decorate$b([
|
||||
Property,
|
||||
__metadata$b("design:type", Function)
|
||||
@ -3268,6 +3272,10 @@ var FlowLayout = /** @class */ (function (_super) {
|
||||
Property,
|
||||
__metadata$7("design:type", Boolean)
|
||||
], FlowLayout.prototype, "canDrag", void 0);
|
||||
__decorate$7([
|
||||
Property,
|
||||
__metadata$7("design:type", Function)
|
||||
], FlowLayout.prototype, "itemCanDrag", void 0);
|
||||
__decorate$7([
|
||||
Property,
|
||||
__metadata$7("design:type", Function)
|
||||
@ -4010,6 +4018,10 @@ var HorizontalList = /** @class */ (function (_super) {
|
||||
Property,
|
||||
__metadata("design:type", Boolean)
|
||||
], HorizontalList.prototype, "canDrag", void 0);
|
||||
__decorate([
|
||||
Property,
|
||||
__metadata("design:type", Function)
|
||||
], HorizontalList.prototype, "itemCanDrag", void 0);
|
||||
__decorate([
|
||||
Property,
|
||||
__metadata("design:type", Function)
|
||||
|
@ -1972,6 +1972,10 @@ __decorate$b([
|
||||
Property,
|
||||
__metadata$b("design:type", Boolean)
|
||||
], List.prototype, "canDrag", void 0);
|
||||
__decorate$b([
|
||||
Property,
|
||||
__metadata$b("design:type", Function)
|
||||
], List.prototype, "itemCanDrag", void 0);
|
||||
__decorate$b([
|
||||
Property,
|
||||
__metadata$b("design:type", Function)
|
||||
@ -2505,6 +2509,10 @@ __decorate$7([
|
||||
Property,
|
||||
__metadata$7("design:type", Boolean)
|
||||
], FlowLayout.prototype, "canDrag", void 0);
|
||||
__decorate$7([
|
||||
Property,
|
||||
__metadata$7("design:type", Function)
|
||||
], FlowLayout.prototype, "itemCanDrag", void 0);
|
||||
__decorate$7([
|
||||
Property,
|
||||
__metadata$7("design:type", Function)
|
||||
@ -3071,6 +3079,10 @@ __decorate([
|
||||
Property,
|
||||
__metadata("design:type", Boolean)
|
||||
], HorizontalList.prototype, "canDrag", void 0);
|
||||
__decorate([
|
||||
Property,
|
||||
__metadata("design:type", Function)
|
||||
], HorizontalList.prototype, "itemCanDrag", void 0);
|
||||
__decorate([
|
||||
Property,
|
||||
__metadata("design:type", Function)
|
||||
|
@ -3502,6 +3502,10 @@ __decorate$b([
|
||||
Property,
|
||||
__metadata$b("design:type", Boolean)
|
||||
], List.prototype, "canDrag", void 0);
|
||||
__decorate$b([
|
||||
Property,
|
||||
__metadata$b("design:type", Function)
|
||||
], List.prototype, "itemCanDrag", void 0);
|
||||
__decorate$b([
|
||||
Property,
|
||||
__metadata$b("design:type", Function)
|
||||
@ -4035,6 +4039,10 @@ __decorate$7([
|
||||
Property,
|
||||
__metadata$7("design:type", Boolean)
|
||||
], FlowLayout.prototype, "canDrag", void 0);
|
||||
__decorate$7([
|
||||
Property,
|
||||
__metadata$7("design:type", Function)
|
||||
], FlowLayout.prototype, "itemCanDrag", void 0);
|
||||
__decorate$7([
|
||||
Property,
|
||||
__metadata$7("design:type", Function)
|
||||
@ -4601,6 +4609,10 @@ __decorate([
|
||||
Property,
|
||||
__metadata("design:type", Boolean)
|
||||
], HorizontalList.prototype, "canDrag", void 0);
|
||||
__decorate([
|
||||
Property,
|
||||
__metadata("design:type", Function)
|
||||
], HorizontalList.prototype, "itemCanDrag", void 0);
|
||||
__decorate([
|
||||
Property,
|
||||
__metadata("design:type", Function)
|
||||
|
33
doric-js/index.d.ts
vendored
33
doric-js/index.d.ts
vendored
@ -1029,7 +1029,16 @@ declare module "doric" {
|
||||
*/
|
||||
bounces?: boolean;
|
||||
canDrag?: boolean;
|
||||
beforeDragging?: (from: number) => void;
|
||||
/**
|
||||
* @param from
|
||||
* @returns Returns the item of index which can dragged or not.
|
||||
*/
|
||||
itemCanDrag?: (from: number) => boolean;
|
||||
/**
|
||||
* @param from
|
||||
* @returns Returns an array of index which can not be swap during dragging.
|
||||
*/
|
||||
beforeDragging?: (from: number) => (Array<number> | void);
|
||||
onDragging?: (from: number, to: number) => void;
|
||||
onDragged?: (from: number, to: number) => void;
|
||||
scrollToItem(context: BridgeContext, index: number, config?: {
|
||||
@ -1191,7 +1200,16 @@ declare module "doric" {
|
||||
*/
|
||||
bounces?: boolean;
|
||||
canDrag?: boolean;
|
||||
beforeDragging?: (from: number) => void;
|
||||
/**
|
||||
* @param from
|
||||
* @returns Returns the item of index which can dragged or not.
|
||||
*/
|
||||
itemCanDrag?: (from: number) => boolean;
|
||||
/**
|
||||
* @param from
|
||||
* @returns Returns an array of index which can not be swap during dragging.
|
||||
*/
|
||||
beforeDragging?: (from: number) => (Array<number> | void);
|
||||
onDragging?: (from: number, to: number) => void;
|
||||
onDragged?: (from: number, to: number) => void;
|
||||
/**
|
||||
@ -1454,7 +1472,16 @@ declare module "doric" {
|
||||
*/
|
||||
bounces?: boolean;
|
||||
canDrag?: boolean;
|
||||
beforeDragging?: (from: number) => void;
|
||||
/**
|
||||
* @param from
|
||||
* @returns Returns the item of index which can dragged or not.
|
||||
*/
|
||||
itemCanDrag?: (from: number) => boolean;
|
||||
/**
|
||||
* @param from
|
||||
* @returns Returns an array of index which can not be swap during dragging.
|
||||
*/
|
||||
beforeDragging?: (from: number) => (Array<number> | void);
|
||||
onDragging?: (from: number, to: number) => void;
|
||||
onDragged?: (from: number, to: number) => void;
|
||||
scrollToItem(context: BridgeContext, index: number, config?: {
|
||||
|
11
doric-js/lib/src/widget/flowlayout.d.ts
vendored
11
doric-js/lib/src/widget/flowlayout.d.ts
vendored
@ -38,7 +38,16 @@ export declare class FlowLayout extends Superview {
|
||||
*/
|
||||
bounces?: boolean;
|
||||
canDrag?: boolean;
|
||||
beforeDragging?: (from: number) => void;
|
||||
/**
|
||||
* @param from
|
||||
* @returns Returns the item of index which can dragged or not.
|
||||
*/
|
||||
itemCanDrag?: (from: number) => boolean;
|
||||
/**
|
||||
* @param from
|
||||
* @returns Returns an array of index which can not be swap during dragging.
|
||||
*/
|
||||
beforeDragging?: (from: number) => (Array<number> | void);
|
||||
onDragging?: (from: number, to: number) => void;
|
||||
onDragged?: (from: number, to: number) => void;
|
||||
/**
|
||||
|
@ -151,6 +151,10 @@ __decorate([
|
||||
Property,
|
||||
__metadata("design:type", Boolean)
|
||||
], FlowLayout.prototype, "canDrag", void 0);
|
||||
__decorate([
|
||||
Property,
|
||||
__metadata("design:type", Function)
|
||||
], FlowLayout.prototype, "itemCanDrag", void 0);
|
||||
__decorate([
|
||||
Property,
|
||||
__metadata("design:type", Function)
|
||||
|
11
doric-js/lib/src/widget/horizontalList.d.ts
vendored
11
doric-js/lib/src/widget/horizontalList.d.ts
vendored
@ -31,7 +31,16 @@ export declare class HorizontalList extends Superview {
|
||||
*/
|
||||
bounces?: boolean;
|
||||
canDrag?: boolean;
|
||||
beforeDragging?: (from: number) => void;
|
||||
/**
|
||||
* @param from
|
||||
* @returns Returns the item of index which can dragged or not.
|
||||
*/
|
||||
itemCanDrag?: (from: number) => boolean;
|
||||
/**
|
||||
* @param from
|
||||
* @returns Returns an array of index which can not be swap during dragging.
|
||||
*/
|
||||
beforeDragging?: (from: number) => (Array<number> | void);
|
||||
onDragging?: (from: number, to: number) => void;
|
||||
onDragged?: (from: number, to: number) => void;
|
||||
scrollToItem(context: BridgeContext, index: number, config?: {
|
||||
|
@ -142,6 +142,10 @@ __decorate([
|
||||
Property,
|
||||
__metadata("design:type", Boolean)
|
||||
], HorizontalList.prototype, "canDrag", void 0);
|
||||
__decorate([
|
||||
Property,
|
||||
__metadata("design:type", Function)
|
||||
], HorizontalList.prototype, "itemCanDrag", void 0);
|
||||
__decorate([
|
||||
Property,
|
||||
__metadata("design:type", Function)
|
||||
|
11
doric-js/lib/src/widget/list.d.ts
vendored
11
doric-js/lib/src/widget/list.d.ts
vendored
@ -37,7 +37,16 @@ export declare class List extends Superview {
|
||||
*/
|
||||
bounces?: boolean;
|
||||
canDrag?: boolean;
|
||||
beforeDragging?: (from: number) => void;
|
||||
/**
|
||||
* @param from
|
||||
* @returns Returns the item of index which can dragged or not.
|
||||
*/
|
||||
itemCanDrag?: (from: number) => boolean;
|
||||
/**
|
||||
* @param from
|
||||
* @returns Returns an array of index which can not be swap during dragging.
|
||||
*/
|
||||
beforeDragging?: (from: number) => (Array<number> | void);
|
||||
onDragging?: (from: number, to: number) => void;
|
||||
onDragged?: (from: number, to: number) => void;
|
||||
scrollToItem(context: BridgeContext, index: number, config?: {
|
||||
|
@ -146,6 +146,10 @@ __decorate([
|
||||
Property,
|
||||
__metadata("design:type", Boolean)
|
||||
], List.prototype, "canDrag", void 0);
|
||||
__decorate([
|
||||
Property,
|
||||
__metadata("design:type", Function)
|
||||
], List.prototype, "itemCanDrag", void 0);
|
||||
__decorate([
|
||||
Property,
|
||||
__metadata("design:type", Function)
|
||||
|
@ -87,8 +87,19 @@ export class FlowLayout extends Superview {
|
||||
@Property
|
||||
canDrag?: boolean
|
||||
|
||||
/**
|
||||
* @param from
|
||||
* @returns Returns the item of index which can dragged or not.
|
||||
*/
|
||||
@Property
|
||||
beforeDragging?: (from: number) => void
|
||||
itemCanDrag?: (from: number) => boolean
|
||||
|
||||
/**
|
||||
* @param from
|
||||
* @returns Returns an array of index which can not be swap during dragging.
|
||||
*/
|
||||
@Property
|
||||
beforeDragging?: (from: number) => (Array<number> | void)
|
||||
|
||||
@Property
|
||||
onDragging?: (from: number, to: number) => void
|
||||
|
@ -84,8 +84,19 @@ export class HorizontalList extends Superview {
|
||||
@Property
|
||||
canDrag?: boolean
|
||||
|
||||
/**
|
||||
* @param from
|
||||
* @returns Returns the item of index which can dragged or not.
|
||||
*/
|
||||
@Property
|
||||
beforeDragging?: (from: number) => void
|
||||
itemCanDrag?: (from: number) => boolean
|
||||
|
||||
/**
|
||||
* @param from
|
||||
* @returns Returns an array of index which can not be swap during dragging.
|
||||
*/
|
||||
@Property
|
||||
beforeDragging?: (from: number) => (Array<number> | void)
|
||||
|
||||
@Property
|
||||
onDragging?: (from: number, to: number) => void
|
||||
|
@ -84,8 +84,19 @@ export class List extends Superview {
|
||||
@Property
|
||||
canDrag?: boolean
|
||||
|
||||
/**
|
||||
* @param from
|
||||
* @returns Returns the item of index which can dragged or not.
|
||||
*/
|
||||
@Property
|
||||
beforeDragging?: (from: number) => void
|
||||
itemCanDrag?: (from: number) => boolean
|
||||
|
||||
/**
|
||||
* @param from
|
||||
* @returns Returns an array of index which can not be swap during dragging.
|
||||
*/
|
||||
@Property
|
||||
beforeDragging?: (from: number) => (Array<number> | void)
|
||||
|
||||
@Property
|
||||
onDragging?: (from: number, to: number) => void
|
||||
|
Reference in New Issue
Block a user