@eclipse-glsp-examples/workflow-glsp 0.9.0-next.fd1a8bb6 → 0.10.0-next.827bd0d.158

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/model.ts CHANGED
@@ -109,3 +109,28 @@ export class Icon extends SShapeElement implements LayoutContainer {
109
109
  height: 32
110
110
  };
111
111
  }
112
+
113
+ export class CategoryNode extends RectangularNode implements Nameable, WithEditableLabel {
114
+ static readonly DEFAULT_FEATURES = [
115
+ deletableFeature,
116
+ selectFeature,
117
+ boundsFeature,
118
+ moveFeature,
119
+ layoutContainerFeature,
120
+ fadeFeature,
121
+ hoverFeedbackFeature,
122
+ popupFeature,
123
+ nameFeature,
124
+ withEditLabelFeature
125
+ ];
126
+
127
+ name = '';
128
+
129
+ get editableLabel(): (SChildElement & EditableLabel) | undefined {
130
+ const label = this.children.find(element => element.type === 'label:heading');
131
+ if (label && isEditableLabel(label)) {
132
+ return label;
133
+ }
134
+ return undefined;
135
+ }
136
+ }
@@ -25,7 +25,6 @@ import {
25
25
  import { injectable } from 'inversify';
26
26
  import { VNode } from 'snabbdom';
27
27
  import { svg } from 'sprotty';
28
-
29
28
  import { Icon } from './model';
30
29
 
31
30
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
@@ -58,13 +57,13 @@ export class IconView implements IView {
58
57
  const radius = this.getRadius();
59
58
  return (
60
59
  <g>
61
- <circle class-sprotty-icon={true} r={radius} cx={radius} cy={radius}></circle>
60
+ <circle class-sprotty-icon={true} r={radius} cx={radius + 2} cy={radius + 2}></circle>
62
61
  {context.renderChildren(element)}
63
62
  </g>
64
63
  );
65
64
  }
66
65
 
67
66
  getRadius(): number {
68
- return 16;
67
+ return 14;
69
68
  }
70
69
  }