|
@@ -20,12 +20,19 @@ import 'two_length.dart';
|
|
|
class TwoStraightLine extends TwoLengthAbstract<TwoStraightLineFeature> {
|
|
|
late final StraightLine x;
|
|
|
late final StraightLine y;
|
|
|
+ final bool ifVertical;
|
|
|
|
|
|
- TwoStraightLine(ItemMeta meta) : super(meta) {
|
|
|
+ TwoStraightLine(ItemMeta meta, {this.ifVertical = false}) : super(meta) {
|
|
|
final metaX = meta.childItems[0];
|
|
|
final metaY = meta.childItems[1];
|
|
|
- x = StraightLine.createDistance(metaX, this);
|
|
|
- y = StraightLine.createDistance(metaY, this);
|
|
|
+
|
|
|
+ if (ifVertical) {
|
|
|
+ x = StraightLine.createDistance(metaX, this);
|
|
|
+ y = StraightLine.createDistance(metaY, this);
|
|
|
+ } else {
|
|
|
+ x = StraightLine.createVerticalDistance(metaX, this);
|
|
|
+ y = StraightLine.createVerticalDistance(metaY, this);
|
|
|
+ }
|
|
|
childItems.add(x);
|
|
|
childItems.add(y);
|
|
|
}
|
|
@@ -83,6 +90,14 @@ class TwoStraightLine extends TwoLengthAbstract<TwoStraightLineFeature> {
|
|
|
|
|
|
return twoStraightline;
|
|
|
}
|
|
|
+
|
|
|
+ static TwoStraightLine createStenosisTwoVerticalDistance(ItemMeta meta,
|
|
|
+ [IMeasureItem? parent]) {
|
|
|
+ var twoStraightline = TwoStraightLine(meta, ifVertical: true);
|
|
|
+ twoStraightline.calculator = StenosisCal(twoStraightline);
|
|
|
+
|
|
|
+ return twoStraightline;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
class TwoStraightLineFeature extends TopMeasureItemFeature {
|