По-моему это можно обобщить

Issue #123 new
Alex Lulin repo owner created an issue
  • procedure TmsDiagramm.ProcessClick(const aClickContext: TmsClickContext);
  • begin
  • if ShapeIsEnded then
  • // - мы НЕ ДОБАВЛЯЛИ примитива - надо его ДОБАВИТЬ
  • BeginShape(aClickContext)
  • else
  • EndShape(aClickContext.rClickPoint, aClickContext.rDiagrammsHolder);
  • end;
  • procedure TmsDiagramm.MouseUp(const aClickContext: TmsClickContext);
  • begin
  • if Assigned(FCurrentAddedShape) then
  • if CurrentAddedShape.IsNeedsMouseUp then
  • Self.EndShape(aClickContext.rClickPoint, aClickContext.rDiagrammsHolder);
  • end;
  • procedure TmsDiagramm.EndShape(const aFinish: TPointF; aDiagrammsHolder: ImsDiagrammsHolder);
  • begin
  • Assert(CurrentAddedShape <> nil);
  • if CurrentAddedShape.EndTo(TmsEndShapeContext.Create(aFinish, Self, aDiagrammsHolder)) then
  • FCurrentAddedShape := nil;
  • Invalidate;
  • end;

Comments (2)

  1. Log in to comment