feat:delete gravity in Stack
This commit is contained in:
parent
009c723bc8
commit
3f4b336205
@ -51,13 +51,7 @@ public class StackNode extends GroupNode<FrameLayout> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void blend(FrameLayout view, String name, JSValue prop) {
|
protected void blend(FrameLayout view, String name, JSValue prop) {
|
||||||
switch (name) {
|
super.blend(view, name, prop);
|
||||||
case "gravity":
|
|
||||||
view.setForegroundGravity(prop.asNumber().toInt());
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
super.blend(view, name, prop);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -17,6 +17,7 @@ package pub.doric.shader.list;
|
|||||||
|
|
||||||
import android.widget.FrameLayout;
|
import android.widget.FrameLayout;
|
||||||
|
|
||||||
|
import com.github.pengfeizhou.jscore.JSObject;
|
||||||
import com.github.pengfeizhou.jscore.JSValue;
|
import com.github.pengfeizhou.jscore.JSValue;
|
||||||
|
|
||||||
import pub.doric.DoricContext;
|
import pub.doric.DoricContext;
|
||||||
@ -45,4 +46,11 @@ public class ListItemNode extends StackNode {
|
|||||||
super.blend(view, name, prop);
|
super.blend(view, name, prop);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void blend(JSObject jsObject) {
|
||||||
|
super.blend(jsObject);
|
||||||
|
getDoricLayer().getLayoutParams().width = getLayoutParams().width;
|
||||||
|
getDoricLayer().getLayoutParams().height = getLayoutParams().height;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,10 +29,6 @@ - (DoricStackView *)build {
|
|||||||
}
|
}
|
||||||
|
|
||||||
- (void)blendView:(DoricStackView *)view forPropName:(NSString *)name propValue:(id)prop {
|
- (void)blendView:(DoricStackView *)view forPropName:(NSString *)name propValue:(id)prop {
|
||||||
if ([name isEqualToString:@"gravity"]) {
|
[super blendView:view forPropName:name propValue:prop];
|
||||||
view.gravity = (DoricGravity) [(NSNumber *) prop integerValue];
|
|
||||||
} else {
|
|
||||||
[super blendView:view forPropName:name propValue:prop];
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@end
|
@end
|
||||||
|
@ -17,12 +17,9 @@ import { LayoutConfig, Group, Property, IView } from "./view";
|
|||||||
import { Gravity } from "../util/gravity";
|
import { Gravity } from "../util/gravity";
|
||||||
|
|
||||||
export interface IStack extends IView {
|
export interface IStack extends IView {
|
||||||
gravity?: Gravity
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export class Stack extends Group implements IStack {
|
export class Stack extends Group implements IStack {
|
||||||
@Property
|
|
||||||
gravity?: Gravity
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user