| … | … | @@ -16,21 +16,16 @@ extends PanelContainer |
| 16 | 16 | @onready var status_label: Label = %StatusLabel |
| 17 | 17 | |
| 18 | 18 | const ALGO_PRESETS: Array[Dictionary] = [ |
| 19 | | # Simple slices |
| 20 | | {"name": "category", "features": [{"type": "category", "weight": 1.0}], "threshold": 0.1, "minSize": 2}, |
| 21 | | {"name": "creator", "features": [{"type": "creator", "weight": 1.0}], "threshold": 0.1, "minSize": 2}, |
| 22 | | {"name": "activity", "features": [{"type": "activity", "weight": 1.0}], "threshold": 0.1, "minSize": 2}, |
| 23 | | {"name": "size", "features": [{"type": "size", "weight": 1.0}], "threshold": 0.1, "minSize": 2}, |
| 24 | | {"name": "topics", "features": [{"type": "topics", "weight": 1.0}], "threshold": 0.3, "minSize": 2}, |
| 25 | | {"name": "members", "features": [{"type": "members", "weight": 1.0}], "threshold": 0.5, "minSize": 2}, |
| 26 | | # Stacked combos (hierarchical: primary → sub-split by secondary) |
| 27 | | {"name": "creator+category", "features": [{"type": "creator", "weight": 1.0}, {"type": "category", "weight": 0.8}], "threshold": 0.3, "minSize": 2}, |
| 28 | | {"name": "activity+topics", "features": [{"type": "activity", "weight": 1.0}, {"type": "topics", "weight": 0.7}], "threshold": 0.3, "minSize": 2}, |
| 29 | | {"name": "category+activity", "features": [{"type": "category", "weight": 1.0}, {"type": "activity", "weight": 0.6}], "threshold": 0.2, "minSize": 2}, |
| 30 | | # Mind map variants (radial tree layout) |
| 31 | | {"name": "mindmap:category", "layout": "mindmap", "features": [{"type": "category", "weight": 1.0}], "threshold": 0.1, "minSize": 2}, |
| 32 | | {"name": "mindmap:topics", "layout": "mindmap", "features": [{"type": "topics", "weight": 1.0}], "threshold": 0.3, "minSize": 2}, |
| 33 | | {"name": "mindmap:activity", "layout": "mindmap", "features": [{"type": "activity", "weight": 1.0}], "threshold": 0.1, "minSize": 2}, |
| 19 | # All mindmap layout — single views |
| 20 | {"name": "category", "layout": "mindmap", "features": [{"type": "category", "weight": 1.0}], "threshold": 0.1, "minSize": 2}, |
| 21 | {"name": "topics", "layout": "mindmap", "features": [{"type": "topics", "weight": 1.0}], "threshold": 0.3, "minSize": 2}, |
| 22 | {"name": "activity", "layout": "mindmap", "features": [{"type": "activity", "weight": 1.0}], "threshold": 0.1, "minSize": 2}, |
| 23 | {"name": "people", "layout": "mindmap", "features": [{"type": "size", "weight": 1.0}], "threshold": 0.1, "minSize": 2}, |
| 24 | {"name": "creator", "layout": "mindmap", "features": [{"type": "creator", "weight": 1.0}], "threshold": 0.1, "minSize": 2}, |
| 25 | {"name": "members", "layout": "mindmap", "features": [{"type": "members", "weight": 1.0}], "threshold": 0.5, "minSize": 2}, |
| 26 | # Combined views |
| 27 | {"name": "activity+topics", "layout": "mindmap", "features": [{"type": "activity", "weight": 1.0}, {"type": "topics", "weight": 0.7}], "threshold": 0.3, "minSize": 2}, |
| 28 | {"name": "category+activity", "layout": "mindmap", "features": [{"type": "category", "weight": 1.0}, {"type": "activity", "weight": 0.6}], "threshold": 0.2, "minSize": 2}, |
| 34 | 29 | ] |
| 35 | 30 | |
| 36 | 31 | var _clusters: Array = [] |
| … | … | @@ -62,17 +57,9 @@ func _ready() -> void: |
| 62 | 57 | algo_btn.add_item(ALGO_PRESETS[i]["name"], i + 1) |
| 63 | 58 | algo_btn.item_selected.connect(_on_algo_selected) |
| 64 | 59 | |
| 65 | | # Default to mindmap:category (more readable than force-directed) |
| 66 | | var mindmap_idx: int = -1 |
| 67 | | for i: int in ALGO_PRESETS.size(): |
| 68 | | if ALGO_PRESETS[i]["name"] == "mindmap:category": |
| 69 | | mindmap_idx = i |
| 70 | | break |
| 71 | | if mindmap_idx >= 0: |
| 72 | | algo_btn.selected = mindmap_idx + 1 |
| 73 | | _selected_algo = ALGO_PRESETS[mindmap_idx] |
| 74 | | else: |
| 75 | | algo_btn.selected = 0 |
| 60 | # Default to category (first preset, all are mindmap layout now) |
| 61 | algo_btn.selected = 1 |
| 62 | _selected_algo = ALGO_PRESETS[0] |
| 76 | 63 | |
| 77 | 64 | title_label.text = "Graph" |
| 78 | 65 | |