Skip to content

Commit

Permalink
typos
Browse files Browse the repository at this point in the history
  • Loading branch information
rsoika committed Mar 11, 2023
1 parent eb7908d commit 03334f1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 22 deletions.
17 changes: 7 additions & 10 deletions open-bpmn.glsp-client/open-bpmn-glsp/src/bpmn-helperlines.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,13 @@
********************************************************************************/
import {
Action,
FeedbackCommand,
hasObjectProp,
FeedbackCommand, hasArguments, hasObjectProp,
isBoundsAware,
ISnapper,
hasArguments,
MouseListener,
ISnapper, MouseListener,
SModelElement,
SModelRoot
} from '@eclipse-glsp/client';
import { isBPMNNode, isBPMNLabelNode, LabelNode, isBoundaryEvent, TaskNode, EventNode } from '@open-bpmn/open-bpmn-model';
import { EventNode, isBoundaryEvent, isBPMNLabelNode, isBPMNNode, LabelNode, TaskNode } from '@open-bpmn/open-bpmn-model';
import { inject, injectable } from 'inversify';
import { VNode } from 'snabbdom';
import { CommandExecutionContext, CommandReturn, getAbsoluteBounds, IView, RenderingContext, SChildElement, svg, TYPES } from 'sprotty';
Expand All @@ -34,13 +31,13 @@ const JSX = { createElement: svg };

/****************************************************************************
* This module extends the mouseListener to support helper lines.
* HelperLines are displayed when a element is selected and draged on the diagram pane.
* HelperLines are displayed when a element is selected and dragged on the diagram pane.
*
* If the moved element is alligned to the center of another element on the diagram
* the helper line is shown. There are can be up to two helperlines be displayed
* If the moved element is aligned to the center of another element on the diagram
* the helper line is shown. There are can be up to two helper-lines be displayed
* - horizontal and vertical
*
* The method 'findHelperLines' can be extended to proivde more helper lines
* The method 'findHelperLines' can be extended to provide more helper lines
* to show a different behavior.
****************************************************************************/

Expand Down
19 changes: 11 additions & 8 deletions open-bpmn.glsp-client/open-bpmn-glsp/src/bpmn-routing-views.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,15 @@ import { VNode } from 'snabbdom';
/****************************************************************************
* This module provides BPMN Routings views for sequence flows
*
* Layout for the bpmn sequence flow. The View extends the `PolylineEdgeView` that renders gaps on intersections,
* and the `JumpingPolylineEdgeView` that renders jumps over intersections.
* Layout for the bpmn sequence flow. The View extends the `PolylineEdgeView`,
* that renders gaps on intersections, and the `JumpingPolylineEdgeView` that
* renders jumps over intersections.
*
* In addition the view render rounded corners for a manhattan routing and an arrow on the edge end point
* In addition the view render rounded corners for a manhattan routing and an
* arrow on the edge end point
*
* For conditional SequenceFlows the view also adds the BPMN default symbol
*
* For SequenceFlows the view also adds the BPMN default symbol
****************************************************************************/

// eslint-disable-next-line @typescript-eslint/no-unused-vars
Expand Down Expand Up @@ -59,7 +62,7 @@ export class BPMNEdgeView extends PolylineEdgeViewWithGapsOnIntersections {
/>
);

// Default Sequcnece flow?
// Conditional default Sequence flow?
const defaultSymbol: any = (
<path
class-sprotty-edge={true}
Expand Down Expand Up @@ -137,7 +140,7 @@ export class BPMNEdgeView extends PolylineEdgeViewWithGapsOnIntersections {
path += ` L ${p.x},${p.y}`;
}
} else {
// default behaviour
// default behavior
path += ` L ${p.x},${p.y}`;
}
}
Expand All @@ -149,12 +152,12 @@ export class BPMNEdgeView extends PolylineEdgeViewWithGapsOnIntersections {

/**
* Helper method to compute the maximum possible radius.
* If two poins are very close the radius need to be reduced
* If two points are very close the radius need to be reduced
*/
protected computeMaxRadius(pCurrent: Point, pLast: Point, pNext: Point): number {
let radius = 10;
const dRef = 0.5;
// verfiy last point
// verify last point
let xDif = Math.abs(pCurrent.x - pLast.x);
let yDif = Math.abs(pCurrent.y - pLast.y);
if (xDif > 0 && xDif < 10) {
Expand Down
3 changes: 1 addition & 2 deletions open-bpmn.glsp-client/open-bpmn-glsp/src/di.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const bpmnDiagramModule = new ContainerModule((bind, unbind, isBound, rebind) =>
bind(TYPES.ICommandPaletteActionProvider).to(RevealNamedElementActionProvider);
bind(TYPES.IContextMenuItemProvider).to(DeleteElementContextMenuItemProvider);

// neuer SelectionListener for Event BPMNLabels
// bind new SelectionListener for BPMNLabels and BoundaryEvents
bind(TYPES.SelectionListener).to(BPMNLabelNodeSelectionListener);

// bpmn helper lines
Expand Down Expand Up @@ -93,7 +93,6 @@ const bpmnDiagramModule = new ContainerModule((bind, unbind, isBound, rebind) =>
configureModelElement(context, 'label:heading', SLabel, SLabelView, { enable: [editLabelFeature] });

configureModelElement(context, 'comp:comp', SCompartment, SCompartmentView);
// configureModelElement(context, 'comp:header', SCompartment, SCompartmentView);
configureModelElement(context, 'icon', Icon, IconView);

configureModelElement(context, 'comp:header', SCompartment, ContainerHeaderView);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,10 @@ import { vanillaCells, vanillaRenderers } from '@jsonforms/vanilla-renderers';
import { isBoundaryEvent } from '@open-bpmn/open-bpmn-model';
import * as React from 'react';
import { createRoot } from 'react-dom/client';
// import SelectItemGroupControl, { selectItemControlTester } from './SelectItemControl';
import { SelectItemComboRendererEntry, SelectItemRendererEntry } from './SelectItemControl';
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
@injectable()
export class BPMNPropertyPanel extends AbstractUIExtension implements SelectionListener, IActionHandler { // IActionHandler EditModeListener
export class BPMNPropertyPanel extends AbstractUIExtension implements SelectionListener, IActionHandler {

static readonly ID = 'bpmn-property-panel';

Expand Down

0 comments on commit 03334f1

Please sign in to comment.