Skip to content

Commit

Permalink
added spark handle image (#101)
Browse files Browse the repository at this point in the history
* added spark handle image

* small fix

* small fixes to images

* led positions for spark handle, need to be updated

* fixed image and led positioning
  • Loading branch information
LivingSynthesis authored Jan 31, 2025
1 parent e4d42da commit 2c99ac6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 3 deletions.
3 changes: 1 addition & 2 deletions js/LedSelectPanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = '<i class="fa-solid fa-right-left"></i>'
swapDeviceButton.addEventListener('click', () => this.toggleAltImage());
deviceImageContainer.appendChild(swapDeviceButton);
Expand Down
2 changes: 1 addition & 1 deletion js/VortexEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
},
Expand Down
13 changes: 13 additions & 0 deletions public/data/sparkhandle-led-positions.json
Original file line number Diff line number Diff line change
@@ -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" }
]
}
Binary file added public/images/spark-handle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 2c99ac6

Please sign in to comment.