feat:fix view has no superview
This commit is contained in:
parent
1f0a1a5e0a
commit
a5b07949ba
@ -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);
|
||||
}
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user