diff --git a/js/LedSelectPanel.js b/js/LedSelectPanel.js index f4216fd..4adff1b 100644 --- a/js/LedSelectPanel.js +++ b/js/LedSelectPanel.js @@ -114,8 +114,7 @@ export default class LedSelectPanel extends Panel { const swapDeviceButton = document.createElement('button'); swapDeviceButton.id = 'swapDeviceImage'; swapDeviceButton.title = 'Swap Device'; - // TODO: show this button to swap between spark devices - swapDeviceButton.style.display = 'none'; // (this.selectedDevice === 'Spark') ? 'block' : 'none'; + swapDeviceButton.style.display = (this.selectedDevice === 'Spark') ? 'block' : 'none'; swapDeviceButton.innerHTML = '' swapDeviceButton.addEventListener('click', () => this.toggleAltImage()); deviceImageContainer.appendChild(swapDeviceButton); diff --git a/js/VortexEditor.js b/js/VortexEditor.js index cfd2a11..a330d0d 100644 --- a/js/VortexEditor.js +++ b/js/VortexEditor.js @@ -135,7 +135,7 @@ export default class VortexEditor { label: 'Spark', ledCount: 6, // alternate spark image/icon/label for handle - altImage: 'public/images/orbit.png', + altImage: 'public/images/spark-handle.png', altIcon: 'public/images/spark-handle-logo-square-64.png', altLabel: 'SparkHandle', }, diff --git a/public/data/sparkhandle-led-positions.json b/public/data/sparkhandle-led-positions.json new file mode 100644 index 0000000..033cd95 --- /dev/null +++ b/public/data/sparkhandle-led-positions.json @@ -0,0 +1,13 @@ +{ + "device_name": "Sparkhandle", + "original_width": 500, + "original_height": 250, + "points": [ + {"x": 300, "y": 222, "name": "Bottom Right" }, + {"x": 200, "y": 222, "name": "Bottom Left" }, + {"x": 200, "y": 130, "name": "Middle Left" }, + {"x": 200, "y": 40, "name": "Top Left" }, + {"x": 300, "y": 40, "name": "Top Right" }, + {"x": 300, "y": 130, "name": "Middle Right" } + ] +} diff --git a/public/images/spark-handle.png b/public/images/spark-handle.png new file mode 100644 index 0000000..95e58cb Binary files /dev/null and b/public/images/spark-handle.png differ