Skip to content

Commit 4dec852

Browse files
committed
Rebuild documentation after code changes
- Regenerated docs and dist files after source code modifications - Updated JSDoc data files for modified classes: * draw2d.policy.canvas.SelectionPolicy * draw2d.policy.canvas.SingleSelectionPolicy * draw2d.Connection * draw2d.decoration.connection.Decorator * draw2d.shape.basic.Label * draw2d.geo.Rectangle - Synced docs/examples with latest examples including connection_selection_feedback - Updated build artifacts (draw2d.js, draw2d.js.map) - Refreshed Vue app bundle (app.86c63141.js)
1 parent d3c3077 commit 4dec852

76 files changed

Lines changed: 1827 additions & 387 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

dist/draw2d.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/draw2d.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/data/draw2d.geo.Rectangle.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,38 @@
746746
"description": ""
747747
}
748748
},
749+
{
750+
"name": "intersectsOrTouches",
751+
"access": "",
752+
"virtual": false,
753+
"deprecated": "",
754+
"description": "<p>Checks whenever the rectangles intersect or touch each other.\nUnlike intersects(), this method returns true even if the rectangles\nonly share a common edge or corner point.</p>\n<p>This is useful for line intersection detection where lines can intersect\neven if their bounding boxes only touch.</p>\n<p>A small tolerance is applied to handle floating-point precision issues\nand to detect near-misses.</p>",
755+
"parameters": [
756+
{
757+
"name": "rect",
758+
"type": "draw2d.geo.Rectangle",
759+
"description": "",
760+
"default": "",
761+
"optional": "",
762+
"nullable": ""
763+
},
764+
{
765+
"name": "tolerance",
766+
"type": "Number",
767+
"description": "<p>tolerance in pixels for near-touch detection</p>",
768+
"default": 0.5,
769+
"optional": true,
770+
"nullable": ""
771+
}
772+
],
773+
"inherited": false,
774+
"since": "6.x.x",
775+
"examples": [],
776+
"returns": {
777+
"type": "Boolean",
778+
"description": "<p>true if rectangles intersect or touch (within tolerance)</p>"
779+
}
780+
},
749781
{
750782
"name": "merge",
751783
"access": "",

docs/data/draw2d.geo.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1728,6 +1728,38 @@
17281728
"description": ""
17291729
}
17301730
},
1731+
{
1732+
"name": "intersectsOrTouches",
1733+
"access": "",
1734+
"virtual": false,
1735+
"deprecated": "",
1736+
"description": "<p>Checks whenever the rectangles intersect or touch each other.\nUnlike intersects(), this method returns true even if the rectangles\nonly share a common edge or corner point.</p>\n<p>This is useful for line intersection detection where lines can intersect\neven if their bounding boxes only touch.</p>\n<p>A small tolerance is applied to handle floating-point precision issues\nand to detect near-misses.</p>",
1737+
"parameters": [
1738+
{
1739+
"name": "rect",
1740+
"type": "draw2d.geo.Rectangle",
1741+
"description": "",
1742+
"default": "",
1743+
"optional": "",
1744+
"nullable": ""
1745+
},
1746+
{
1747+
"name": "tolerance",
1748+
"type": "Number",
1749+
"description": "<p>tolerance in pixels for near-touch detection</p>",
1750+
"default": 0.5,
1751+
"optional": true,
1752+
"nullable": ""
1753+
}
1754+
],
1755+
"inherited": false,
1756+
"since": "6.x.x",
1757+
"examples": [],
1758+
"returns": {
1759+
"type": "Boolean",
1760+
"description": "<p>true if rectangles intersect or touch (within tolerance)</p>"
1761+
}
1762+
},
17311763
{
17321764
"name": "merge",
17331765
"access": "",

docs/data/draw2d.policy.canvas.BoundingboxSelectionPolicy.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@
227227
"access": "",
228228
"virtual": false,
229229
"deprecated": "",
230-
"description": "<p>Selects the given figure within the canvas. The policy must unselect already selected\nfigures or show any decorations.</p>",
230+
"description": "<p>Selects the given figure. Must be implemented by subclasses to define\nspecific selection behavior (single, multi, etc.) and visual feedback.</p>",
231231
"parameters": [
232232
{
233233
"name": "canvas",
@@ -240,7 +240,7 @@
240240
{
241241
"name": "figure",
242242
"type": "draw2d.Figure",
243-
"description": "",
243+
"description": "<p>The figure to select, or null to clear selection</p>",
244244
"default": "",
245245
"optional": "",
246246
"nullable": ""
@@ -255,7 +255,7 @@
255255
"access": "",
256256
"virtual": false,
257257
"deprecated": "",
258-
"description": "<p>Unselect the given figure in the canvas and remove all resize handles</p>",
258+
"description": "<p>Unselects the given figure and removes all visual feedback.</p>",
259259
"parameters": [
260260
{
261261
"name": "canvas",
@@ -275,7 +275,7 @@
275275
}
276276
],
277277
"inherited": true,
278-
"since": "",
278+
"since": "6.1.42",
279279
"examples": []
280280
},
281281
{

docs/data/draw2d.policy.canvas.GhostMoveSelectionPolicy.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"access": "",
4747
"virtual": false,
4848
"deprecated": "",
49-
"description": "<p>Selects the given figure within the canvas. The policy must unselect already selected\nfigures or show any decorations.</p>",
49+
"description": "<p>Selects the given figure. Must be implemented by subclasses to define\nspecific selection behavior (single, multi, etc.) and visual feedback.</p>",
5050
"parameters": [
5151
{
5252
"name": "canvas",
@@ -59,7 +59,7 @@
5959
{
6060
"name": "figure",
6161
"type": "draw2d.Figure",
62-
"description": "",
62+
"description": "<p>The figure to select, or null to clear selection</p>",
6363
"default": "",
6464
"optional": "",
6565
"nullable": ""
@@ -350,7 +350,7 @@
350350
"access": "",
351351
"virtual": false,
352352
"deprecated": "",
353-
"description": "<p>Unselect the given figure in the canvas and remove all resize handles</p>",
353+
"description": "<p>Unselects the given figure and removes all visual feedback.</p>",
354354
"parameters": [
355355
{
356356
"name": "canvas",
@@ -370,7 +370,7 @@
370370
}
371371
],
372372
"inherited": true,
373-
"since": "",
373+
"since": "6.1.42",
374374
"examples": []
375375
},
376376
{

docs/data/draw2d.policy.canvas.PanningSelectionPolicy.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"access": "",
9393
"virtual": false,
9494
"deprecated": "",
95-
"description": "<p>Selects the given figure within the canvas. The policy must unselect already selected\nfigures or show any decorations.</p>",
95+
"description": "<p>Selects the given figure. Must be implemented by subclasses to define\nspecific selection behavior (single, multi, etc.) and visual feedback.</p>",
9696
"parameters": [
9797
{
9898
"name": "canvas",
@@ -105,7 +105,7 @@
105105
{
106106
"name": "figure",
107107
"type": "draw2d.Figure",
108-
"description": "",
108+
"description": "<p>The figure to select, or null to clear selection</p>",
109109
"default": "",
110110
"optional": "",
111111
"nullable": ""
@@ -328,7 +328,7 @@
328328
"access": "",
329329
"virtual": false,
330330
"deprecated": "",
331-
"description": "<p>Unselect the given figure in the canvas and remove all resize handles</p>",
331+
"description": "<p>Unselects the given figure and removes all visual feedback.</p>",
332332
"parameters": [
333333
{
334334
"name": "canvas",
@@ -348,7 +348,7 @@
348348
}
349349
],
350350
"inherited": true,
351-
"since": "",
351+
"since": "6.1.42",
352352
"examples": []
353353
},
354354
{

docs/data/draw2d.policy.canvas.ReadOnlySelectionPolicy.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@
130130
{
131131
"name": "select",
132132
"access": "",
133-
"virtual": false,
133+
"virtual": true,
134134
"deprecated": "",
135-
"description": "<p>Selects the given figure within the canvas. The policy must unselect already selected\nfigures or show any decorations.</p>",
135+
"description": "<p>Selects the given figure. Must be implemented by subclasses to define\nspecific selection behavior (single, multi, etc.) and visual feedback.</p>",
136136
"parameters": [
137137
{
138138
"name": "canvas",
@@ -145,7 +145,7 @@
145145
{
146146
"name": "figure",
147147
"type": "draw2d.Figure",
148-
"description": "",
148+
"description": "<p>The figure to select, or null to clear selection</p>",
149149
"default": "",
150150
"optional": "",
151151
"nullable": ""
@@ -160,7 +160,7 @@
160160
"access": "",
161161
"virtual": false,
162162
"deprecated": "",
163-
"description": "<p>Unselect the given figure in the canvas and remove all resize handles</p>",
163+
"description": "<p>Unselects the given figure and removes all visual feedback.</p>",
164164
"parameters": [
165165
{
166166
"name": "canvas",
@@ -180,7 +180,7 @@
180180
}
181181
],
182182
"inherited": true,
183-
"since": "",
183+
"since": "6.1.42",
184184
"examples": []
185185
},
186186
{

docs/data/draw2d.policy.canvas.SelectionPolicy.json

Lines changed: 33 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "SelectionPolicy",
33
"namespace": "draw2d.policy.canvas",
4-
"description": "",
4+
"description": "<p>Abstract base class for selection policies. Controls how figures are selected and unselected,\nincluding visual feedback and selection behavior.</p>\n<p><strong>Important:</strong> Only one SelectionPolicy can be active at a time. When installing a new\nSelectionPolicy, all other SelectionPolicies are automatically removed from the canvas\nto avoid conflicts.</p>\n<p>Concrete implementations:</p>\n<ul>\n<li>{@link draw2d.policy.canvas.SingleSelectionPolicy} - Single selection behavior</li>\n<li>{@link draw2d.policy.canvas.BoundingboxSelectionPolicy} - Multiple selection via bounding box</li>\n<li>{@link draw2d.policy.canvas.ReadOnlySelectionPolicy} - Selection without editing</li>\n</ul>\n<p>When creating custom selection policies, extend from SingleSelectionPolicy or\nBoundingboxSelectionPolicy instead of this base class to inherit complete\nselection/deselection logic and mouse event handling.</p>",
55
"extends": [
66
"draw2d.policy.canvas.CanvasPolicy"
77
],
@@ -13,18 +13,43 @@
1313
"access": "",
1414
"virtual": false,
1515
"deprecated": "",
16-
"description": "<p>Creates a new selection policy</p>",
17-
"parameters": [],
16+
"description": "<p>Creates a new selection policy instance.</p>",
17+
"parameters": [
18+
{
19+
"name": "attr",
20+
"type": "Object",
21+
"description": "",
22+
"default": "",
23+
"optional": true,
24+
"nullable": ""
25+
},
26+
{
27+
"name": "setter",
28+
"type": "Object",
29+
"description": "",
30+
"default": "",
31+
"optional": true,
32+
"nullable": ""
33+
},
34+
{
35+
"name": "getter",
36+
"type": "Object",
37+
"description": "",
38+
"default": "",
39+
"optional": true,
40+
"nullable": ""
41+
}
42+
],
1843
"inherited": false,
1944
"since": "",
2045
"examples": []
2146
},
2247
{
2348
"name": "select",
2449
"access": "",
25-
"virtual": false,
50+
"virtual": true,
2651
"deprecated": "",
27-
"description": "<p>Selects the given figure within the canvas. The policy must unselect already selected\nfigures or show any decorations.</p>",
52+
"description": "<p>Selects the given figure. Must be implemented by subclasses to define\nspecific selection behavior (single, multi, etc.) and visual feedback.</p>",
2853
"parameters": [
2954
{
3055
"name": "canvas",
@@ -37,7 +62,7 @@
3762
{
3863
"name": "figure",
3964
"type": "draw2d.Figure",
40-
"description": "",
65+
"description": "<p>The figure to select, or null to clear selection</p>",
4166
"default": "",
4267
"optional": "",
4368
"nullable": ""
@@ -52,7 +77,7 @@
5277
"access": "",
5378
"virtual": false,
5479
"deprecated": "",
55-
"description": "<p>Unselect the given figure in the canvas and remove all resize handles</p>",
80+
"description": "<p>Unselects the given figure and removes all visual feedback.</p>",
5681
"parameters": [
5782
{
5883
"name": "canvas",
@@ -72,7 +97,7 @@
7297
}
7398
],
7499
"inherited": false,
75-
"since": "",
100+
"since": "6.1.42",
76101
"examples": []
77102
},
78103
{

docs/data/draw2d.policy.canvas.SingleSelectionPolicy.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "SingleSelectionPolicy",
33
"namespace": "draw2d.policy.canvas",
4-
"description": "",
4+
"description": "<p>Selection policy that allows only one figure to be selected at a time. When a new figure\nis selected, any previously selected figure is automatically unselected.</p>\n<p>This is the default selection policy for the canvas. It handles:</p>\n<ul>\n<li>Single figure selection with visual feedback (resize handles)</li>\n<li>Mouse events (mousedown, drag, mouseup, click, doubleclick)</li>\n<li>Drag and drop operations</li>\n<li>Connection line dragging</li>\n<li>Panning for figures that support it</li>\n</ul>",
55
"extends": [
66
"draw2d.policy.canvas.SelectionPolicy"
77
],
@@ -311,7 +311,7 @@
311311
"access": "",
312312
"virtual": false,
313313
"deprecated": "",
314-
"description": "<p>Selects the given figure within the canvas. The policy must unselect already selected\nfigures or show any decorations.</p>",
314+
"description": "<p>Selects the given figure. Must be implemented by subclasses to define\nspecific selection behavior (single, multi, etc.) and visual feedback.</p>",
315315
"parameters": [
316316
{
317317
"name": "canvas",
@@ -324,7 +324,7 @@
324324
{
325325
"name": "figure",
326326
"type": "draw2d.Figure",
327-
"description": "",
327+
"description": "<p>The figure to select, or null to clear selection</p>",
328328
"default": "",
329329
"optional": "",
330330
"nullable": ""
@@ -339,7 +339,7 @@
339339
"access": "",
340340
"virtual": false,
341341
"deprecated": "",
342-
"description": "<p>Unselect the given figure in the canvas and remove all resize handles</p>",
342+
"description": "<p>Unselects the given figure and removes all visual feedback.</p>",
343343
"parameters": [
344344
{
345345
"name": "canvas",
@@ -359,7 +359,7 @@
359359
}
360360
],
361361
"inherited": true,
362-
"since": "",
362+
"since": "6.1.42",
363363
"examples": []
364364
},
365365
{
@@ -651,6 +651,9 @@
651651
"name": "SingleSelectionPolicy",
652652
"description": "",
653653
"parameters": [],
654-
"examples": []
654+
"examples": [
655+
"// Install single selection policy (default)\ncanvas.installEditPolicy(new draw2d.policy.canvas.SingleSelectionPolicy());",
656+
"// Custom selection feedback: double stroke width for selected connections\nlet MySelectionPolicy = draw2d.policy.canvas.SingleSelectionPolicy.extend({\n NAME: \"MySelectionPolicy\",\n \n select: function(canvas, figure) {\n this._super(canvas, figure);\n \n if (figure instanceof draw2d.Connection) {\n figure.originalStroke = figure.getStroke();\n figure.setStroke(figure.originalStroke * 2);\n }\n },\n \n unselect: function(canvas, figure) {\n if (figure instanceof draw2d.Connection && figure.originalStroke) {\n figure.setStroke(figure.originalStroke);\n delete figure.originalStroke;\n }\n \n this._super(canvas, figure);\n }\n});\n\ncanvas.installEditPolicy(new MySelectionPolicy());"
657+
]
655658
}
656659
}

0 commit comments

Comments
 (0)