feat:fix view has no superview

This commit is contained in:
pengfei.zhou 2019-11-26 11:33:08 +08:00
parent 1f0a1a5e0a
commit a5b07949ba
2 changed files with 21 additions and 1 deletions

View File

@ -0,0 +1,20 @@
package pub.doric.pullable;
/**
* @Description: pub.doric.pullable
* @Author: pengfei.zhou
* @CreateDate: 2019-11-25
*/
public interface IPullable {
void startAnimation();
void stopAnimation();
/**
* Set the amount of rotation to apply to the progress spinner.
*
* @param rotation Rotation is from [0..2]
*/
void setProgressRotation(float rotation);
}

View File

@ -316,6 +316,7 @@ export abstract class Superview extends View {
toModel() {
const subviews = []
for (let v of this.allSubviews()) {
v.superview = this
if (v.isDirty()) {
subviews.push(v.toModel())
}
@ -341,7 +342,6 @@ export abstract class Group extends Superview {
}
addChild(view: View) {
view.superview = this
this.children.push(view)
}
}