Skip to content

Commit d5fd74d

Browse files
committed
Remove legacy "editable" flag from configs
1 parent 107fd7e commit d5fd74d

File tree

13 files changed

+14
-26
lines changed

13 files changed

+14
-26
lines changed

client/configs/AGENTS.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ The loading happens in `client/app.js` → `initState()` → `ConfigLoader` →
1515
`ConfigLoader` (`client/core/config-loader.js`) provides:
1616

1717
- **Validation**: Validates config structure (functions array with required `id`/`expression`, graph object with numeric bounds)
18-
- **Defaults**: Applies default values (colors, visibility flags, editable flags, graph settings)
18+
- **Defaults**: Applies default values (colors, visibility flags, graph settings).
1919
- **Events**: Publishes `config:loaded` event after successful processing
2020
- **Dual Interface**:
2121
- `load(path)` - Loads JSON from file system
@@ -27,7 +27,7 @@ The loading happens in `client/app.js` → `initState()` → `ConfigLoader` →
2727
- **Role**: Primary configuration file loaded at application startup
2828
- **Usage**: Actively loaded by `app.js` via `ConfigLoader.load('./configs/config.json')`
2929
- **Purpose**: Defines runtime state (viewport bounds, initial expressions, display settings)
30-
- **Schema**: `{functions: [{id, expression, editable?, visible?}], graph: {xMin, xMax, yMin, yMax, showGrid?, showAxes?, showLegend?}}`
30+
- **Schema**: `{functions: [{id, expression, visible?}], graph: {xMin, xMax, yMin, yMax, showGrid?, showAxes?, showLegend?}}`
3131

3232
### 2. `client/configs/default-config.js` (Fallback Config)
3333
- **Role**: Fallback configuration when `config.json` is unavailable or fails to load

client/configs/config.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
{
44
"id": "f",
55
"expression": "m*x + b",
6-
"editable": false,
76
"visible": true
87
}
98
],
@@ -16,4 +15,4 @@
1615
"showAxes": true,
1716
"showLegend": true
1817
}
19-
}
18+
}

client/configs/samples/functions/absolute-value.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
{
44
"id": "f",
55
"expression": "a * abs(x - h) + k",
6-
"editable": false,
76
"visible": true
87
}
98
],
@@ -16,4 +15,4 @@
1615
"showAxes": true,
1716
"showLegend": true
1817
}
19-
}
18+
}

client/configs/samples/functions/cosine.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
{
44
"id": "f",
55
"expression": "a * cos(b*x + c) + d",
6-
"editable": false,
76
"visible": true
87
}
98
],
@@ -16,4 +15,4 @@
1615
"showAxes": true,
1716
"showLegend": true
1817
}
19-
}
18+
}

client/configs/samples/functions/cubic.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
{
44
"id": "f",
55
"expression": "a*x^3 + b*x^2 + c*x + d",
6-
"editable": false,
76
"visible": true
87
}
98
],
@@ -16,4 +15,4 @@
1615
"showAxes": true,
1716
"showLegend": true
1817
}
19-
}
18+
}

client/configs/samples/functions/exponential.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
{
44
"id": "f",
55
"expression": "a * exp(b*x)",
6-
"editable": false,
76
"visible": true
87
}
98
],
@@ -16,4 +15,4 @@
1615
"showAxes": true,
1716
"showLegend": true
1817
}
19-
}
18+
}

client/configs/samples/functions/linear.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
{
44
"id": "f",
55
"expression": "m*x + b",
6-
"editable": false,
76
"visible": true
87
}
98
],
@@ -16,4 +15,4 @@
1615
"showAxes": true,
1716
"showLegend": true
1817
}
19-
}
18+
}

client/configs/samples/functions/logarithmic.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
{
44
"id": "f",
55
"expression": "a * log(x - h) + k",
6-
"editable": false,
76
"visible": true
87
}
98
],
@@ -16,4 +15,4 @@
1615
"showAxes": true,
1716
"showLegend": true
1817
}
19-
}
18+
}

client/configs/samples/functions/parabola.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
{
44
"id": "f",
55
"expression": "a*(x-h)^2 + k",
6-
"editable": false,
76
"visible": true
87
}
98
],
@@ -16,4 +15,4 @@
1615
"showAxes": true,
1716
"showLegend": true
1817
}
19-
}
18+
}

client/configs/samples/functions/rational.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
{
44
"id": "f",
55
"expression": "(a*x + b) / (c*x + d)",
6-
"editable": false,
76
"visible": true
87
}
98
],
@@ -16,4 +15,4 @@
1615
"showAxes": true,
1716
"showLegend": true
1817
}
19-
}
18+
}

0 commit comments

Comments
 (0)