Skip to content

Commit

Permalink
Release 2.0.99-b5
Browse files Browse the repository at this point in the history
  • Loading branch information
Yeon Vinzenz Varapragasam authored and Yeon Vinzenz Varapragasam committed Jul 18, 2024
1 parent 4d1c617 commit e97bae0
Show file tree
Hide file tree
Showing 15 changed files with 512 additions and 486 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ledfx",
"version": "2.0.99-b4",
"version": "2.0.99-b5",
"description": "LedFx v2 - BladeMOD",
"author": "YeonV aka Blade",
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dialogs/AddDeviceDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ const AddDeviceDialog = () => {
}
useEffect(() => {
handleTypeChange(initial.type, initial.config)
}, [initial.type, initial.config])
}, [initial.type, JSON.stringify(initial.config)])

return (
<StyledDialog
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dialogs/AddIntegrationDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ const AddIntegrationDialog = () => {

useEffect(() => {
handleTypeChange(initial.type, initial.config)
}, [initial.type, initial.config])
}, [initial.type, JSON.stringify(initial.config)])

return (
<StyledDialog
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dialogs/AddVirtualDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ const AddVirtualDialog = () => {
useEffect(() => {
handleModelChange(initial.config)
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [virtId, initial.config])
}, [virtId, JSON.stringify(initial.config)])

return (
<>
Expand Down
2 changes: 1 addition & 1 deletion src/components/Dialogs/NoHostDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export default function NoHostDialog() {
useEffect(() => {
if (storedURL) setHostvalue(storedURL)
if (storedURLs) setHosts(storedURLs)
}, [storedURL, setHosts, storedURLs])
}, [storedURL, setHosts, JSON.stringify(storedURLs)])

useEffect(() => {
if (!storedURL) {
Expand Down
13 changes: 7 additions & 6 deletions src/components/Tours/Tour2dVirtual.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { useState } from 'react'
import { Button, useTheme } from '@mui/material'
import { Button, IconButton, Tooltip, useTheme } from '@mui/material'
import Tour from 'reactour'
import { Info } from '@mui/icons-material'
import { Help, Info, QuestionMark, QuestionMarkOutlined, QuestionMarkRounded } from '@mui/icons-material'
import useStore from '../../store/useStore'

const steps = [
Expand Down Expand Up @@ -170,14 +170,15 @@ const Tour2dVirtual = () => {
const theme = useTheme()
return (
<>
<Button
onClick={() => {
<Tooltip title="How to use 2D Virtuals">
<IconButton onClick={() => {
setIsTourOpen(true)
setTour('2d-virtual')
}}
>
<Info sx={{mr: 2}} /> How to use 2D Virtuals
</Button>
<Help />
</IconButton>
</Tooltip>
<Tour
steps={steps.slice(0, features['matrix_cam'] ? steps.length : 5)}
accentColor={theme.palette.primary.main}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ const assignPixels = ({
}) => {
let updatedM: IMCell[][] = clone(m)
const [col, row] = currentCell
console.log('direction', direction)
if (typeof selectedPixel === 'number') {
updatedM[row][col] = {
deviceId: currentDevice,
Expand All @@ -47,7 +46,7 @@ const assignPixels = ({
group: `${row}-${col}`
}
if (direction.includes('diagonal-top-right')) {
for (let index = 0; index < Math.abs(selectedPixel[1] - selectedPixel[0]) && row - index >= 0 && col + index < colN; index++) {
for (let index = 0; index <= Math.abs(selectedPixel[1] - selectedPixel[0]) && row - index >= 0 && col + index < colN; index++) {
const newM = {
deviceId: currentDevice,
pixel: Math.min(selectedPixel[0], selectedPixel[1]) + index,
Expand All @@ -58,7 +57,7 @@ const assignPixels = ({
}

else if (direction.includes('diagonal-bottom-right')) {
for (let index = 0; index < Math.abs(selectedPixel[1] - selectedPixel[0]) && row + index < rowN && col + index < colN; index++) {
for (let index = 0; index <= Math.abs(selectedPixel[1] - selectedPixel[0]) && row + index < rowN && col + index < colN; index++) {
const newM = {
deviceId: currentDevice,
pixel: Math.min(selectedPixel[0], selectedPixel[1]) + index,
Expand All @@ -69,7 +68,7 @@ const assignPixels = ({
}

else if (direction.includes('diagonal-bottom-left')) {
for (let index = 0; index < Math.abs(selectedPixel[1] - selectedPixel[0]) && row + index < rowN && col - index >= 0; index++) {
for (let index = 0; index <= Math.abs(selectedPixel[1] - selectedPixel[0]) && row + index < rowN && col - index >= 0; index++) {
const newM = {
deviceId: currentDevice,
pixel: Math.min(selectedPixel[0], selectedPixel[1]) + index,
Expand All @@ -80,7 +79,7 @@ const assignPixels = ({
}

else if (direction.includes('diagonal-top-left')) {
for (let index = 0; index < Math.abs(selectedPixel[1] - selectedPixel[0]) && row - index >= 0 && col - index >= 0; index++) {
for (let index = 0; index <= Math.abs(selectedPixel[1] - selectedPixel[0]) && row - index >= 0 && col - index >= 0; index++) {
const newM = {
deviceId: currentDevice,
pixel: Math.min(selectedPixel[0], selectedPixel[1]) + index,
Expand Down
Loading

0 comments on commit e97bae0

Please sign in to comment.