Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Hotspot hover leaves an inline pointer cursor that overrides the crosshair during link placement.
1 open finding
What changed in this PR
This follow-up improves editor refreshes, Safari hotspot selection, and raw-configuration cancellation.
Changes:
- Reload saved editor snapshots reliably.
- Resolve image hotspots using logical coordinates.
- Restore the originating properties dialog and preserve drafts when cancelling raw edits.
| File | Description |
|---|---|
| weathermap-cacti-plugin-editor.php | Places hotspot data alongside the map image. |
| tests/Support/EditorNotesEngineRegression.php | Supplies the map filename for updated markup. |
| tests/Browser/EditorReloadTest.cjs | Tests fresh-document reloads and URL cleanup. |
| tests/Browser/EditorHotspotTest.cjs | Tests scaled, scrolled hotspot selection. |
| tests/Browser/EditorContextMenuTest.cjs | Tests deletion actions and dialog closure. |
| tests/Browser/ConfigCancelTest.cjs | Tests cancellation and preserved properties drafts. |
| js/editor.js | Implements reload, hotspot, and dialog behavior. |
| CHANGELOG.md | Records the editor fixes. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
| }}; | ||
| const context = {URL, window, $: () => ({val: () => 'map.conf'})}; | ||
| vm.createContext(context); | ||
| vm.runInContext(navigation, context); |





Description
Saving changes could keep a stale editor snapshot, Safari could miss node/note hotspots after scrolling, and cancelling raw edits closed the properties dialog. Refresh the saved document correctly, resolve Safari hotspots in logical coordinates and return Cancel/close to the originating properties without losing its unsaved fields.
Related work
Follow-up to #300, #301 and #303.
Validation
PHP 8.3 isolated Cacti-layout fixture: 292 tests / 5,894 assertions; editor reload, Safari hotspots, raw Cancel and context-menu browser checks. PHP/JavaScript syntax, whitespace and release manifest checks pass.
Local coverage extensions are unavailable; CI coverage and review results are pending.