浏览代码

Modify njk.

/main
Yuncong Zhang 6 年前
当前提交
94808f7d
共有 2 个文件被更改,包括 10 次插入10 次删除
  1. 10
      Runtime/rendering/box.mixin.njk
  2. 10
      Runtime/rendering/proxy_box.mixin.njk

10
Runtime/rendering/box.mixin.njk


where ChildType : RenderBox
where ParentDataType : ContainerParentDataMixinBoxParentData<ChildType> {
public double? defaultComputeDistanceToFirstActualBaseline(TextBaseline baseline) {
public float? defaultComputeDistanceToFirstActualBaseline(TextBaseline baseline) {
double? result = child.getDistanceToActualBaseline(baseline);
float? result = child.getDistanceToActualBaseline(baseline);
if (result != null) {
return result.Value + childParentData.offset.dy;
}

return null;
}
public double? defaultComputeDistanceToHighestActualBaseline(TextBaseline baseline) {
double? result = null;
public float? defaultComputeDistanceToHighestActualBaseline(TextBaseline baseline) {
float? result = null;
double? candidate = child.getDistanceToActualBaseline(baseline);
float? candidate = child.getDistanceToActualBaseline(baseline);
if (candidate != null) {
candidate += childParentData.offset.dy;
if (result != null) {

10
Runtime/rendering/proxy_box.mixin.njk


}
}
protected override double computeMinIntrinsicWidth(double height) {
protected override float computeMinIntrinsicWidth(float height) {
if (this.child != null) {
return this.child.getMinIntrinsicWidth(height);
}

protected override double computeMaxIntrinsicWidth(double height) {
protected override float computeMaxIntrinsicWidth(float height) {
if (this.child != null) {
return this.child.getMaxIntrinsicWidth(height);
}

protected override double computeMinIntrinsicHeight(double width) {
protected override float computeMinIntrinsicHeight(float width) {
if (this.child != null) {
return this.child.getMinIntrinsicHeight(width);
}

protected override double computeMaxIntrinsicHeight(double width) {
protected override float computeMaxIntrinsicHeight(float width) {
if (this.child != null) {
return this.child.getMaxIntrinsicHeight(width);
}

protected override double? computeDistanceToActualBaseline(TextBaseline baseline) {
protected override float? computeDistanceToActualBaseline(TextBaseline baseline) {
if (this.child != null) {
return this.child.getDistanceToActualBaseline(baseline);
}

正在加载...
取消
保存