|
@@ -55,7 +55,8 @@ class StraightLine extends MeasureItem<StraightLineFeature> {
|
|
|
void handleMouseDownWhileWaiting(PointInfo args) {
|
|
|
// TODO: 判断是否当前area
|
|
|
// 转换为Area逻辑位置
|
|
|
- feature = StraightLineFeature(this, args, args);
|
|
|
+ final point = args.toAreaLogicPoint();
|
|
|
+ feature = StraightLineFeature(this, point, point);
|
|
|
if (args.hostVisualArea != null) {
|
|
|
feature!.hostVisualArea = args.hostVisualArea;
|
|
|
}
|
|
@@ -89,10 +90,10 @@ class StraightLineFeature extends MeasureItemFeature {
|
|
|
|
|
|
const double vertexSize = 10;
|
|
|
|
|
|
- final startOffset = startPoint.toOffset();
|
|
|
+ final startOffset = convert2ViewPoint(size, startPoint).toOffset();
|
|
|
canvas.drawVertex(startOffset, vertexSize);
|
|
|
|
|
|
- final endOffset = endPoint.toOffset();
|
|
|
+ final endOffset = convert2ViewPoint(size, endPoint).toOffset();
|
|
|
canvas.drawDashLine(startOffset, endOffset, 1, 10, paintPan);
|
|
|
canvas.drawVertex(endOffset, vertexSize, active: isActive);
|
|
|
}
|