feat: add scrollsToTop for scrollable views only for iOS
This commit is contained in:
@@ -84,6 +84,12 @@ export class FlowLayout extends Superview {
|
||||
@Property
|
||||
bounces?: boolean
|
||||
|
||||
/**
|
||||
* Take effect only on iOS
|
||||
*/
|
||||
@Property
|
||||
scrollsToTop?: boolean
|
||||
|
||||
@Property
|
||||
canDrag?: boolean
|
||||
|
||||
|
@@ -81,6 +81,12 @@ export class HorizontalList extends Superview {
|
||||
@Property
|
||||
bounces?: boolean
|
||||
|
||||
/**
|
||||
* Take effect only on iOS
|
||||
*/
|
||||
@Property
|
||||
scrollsToTop?: boolean
|
||||
|
||||
@Property
|
||||
canDrag?: boolean
|
||||
|
||||
@@ -88,8 +94,8 @@ export class HorizontalList extends Superview {
|
||||
* @param from
|
||||
* @returns Returns the item of index which can dragged or not.
|
||||
*/
|
||||
@Property
|
||||
itemCanDrag?: (from: number) => boolean
|
||||
@Property
|
||||
itemCanDrag?: (from: number) => boolean
|
||||
|
||||
/**
|
||||
* @param from
|
||||
|
@@ -81,6 +81,12 @@ export class List extends Superview {
|
||||
@Property
|
||||
bounces?: boolean
|
||||
|
||||
/**
|
||||
* Take effect only on iOS
|
||||
*/
|
||||
@Property
|
||||
scrollsToTop?: boolean
|
||||
|
||||
@Property
|
||||
canDrag?: boolean
|
||||
|
||||
|
@@ -29,6 +29,12 @@ export class NestedSlider extends Group {
|
||||
@Property
|
||||
bounces?: boolean
|
||||
|
||||
/**
|
||||
* Take effect only on iOS
|
||||
*/
|
||||
@Property
|
||||
scrollsToTop?: boolean
|
||||
|
||||
addSlideItem(view: View) {
|
||||
this.addChild(view)
|
||||
}
|
||||
|
@@ -42,12 +42,19 @@ export class Scroller extends Superview implements JSX.ElementChildrenAttribute
|
||||
|
||||
@Property
|
||||
scrollable?: boolean
|
||||
|
||||
/**
|
||||
* Take effect only on iOS
|
||||
*/
|
||||
@Property
|
||||
bounces?: boolean
|
||||
|
||||
/**
|
||||
* Take effect only on iOS
|
||||
*/
|
||||
@Property
|
||||
scrollsToTop?: boolean
|
||||
|
||||
allSubviews() {
|
||||
return [this.content]
|
||||
}
|
||||
|
@@ -56,6 +56,13 @@ export class Slider extends Superview {
|
||||
*/
|
||||
@Property
|
||||
bounces?: boolean
|
||||
|
||||
/**
|
||||
* Take effect only on iOS
|
||||
*/
|
||||
@Property
|
||||
scrollsToTop?: boolean
|
||||
|
||||
/**
|
||||
* Set the effect when sliding
|
||||
* ZoomOut is currently supported
|
||||
|
Reference in New Issue
Block a user