feat:Add Complext Demo

This commit is contained in:
pengfei.zhou
2019-12-03 09:27:20 +08:00
parent 2e96912a99
commit 6d86b8cfeb
3 changed files with 10 additions and 4 deletions

View File

@@ -1,4 +1,4 @@
import { Panel, Group, vlayout, image, layoutConfig, ScaleType, refreshable, Color, pullable, stack, Image, Refreshable, TranslationAnimation } from "doric";
import { Panel, Group, vlayout, image, layoutConfig, ScaleType, refreshable, Color, pullable, stack, Image, Refreshable, TranslationAnimation, loge, log } from "doric";
import { title, icon_refresh } from "./utils";
@Entry
@@ -23,8 +23,9 @@ class MyDemo extends Panel {
},
stopAnimation: () => {
},
setPullingDistance: (rotation: number) => {
headerImage.scaleX = headerImage.scaleY = (headerImage.height + rotation) / headerImage.height
setPullingDistance: (distance: number) => {
headerImage.scaleX = headerImage.scaleY = (headerImage.height + distance * 2) / headerImage.height
log(`Header Image scaleY:${headerImage.scaleY},height:${headerImage.height},distance:${distance}`)
},
}),
content: vlayout([]).apply({