remove cmdId (#381)

* remove cmdId

* remove log
This commit is contained in:
Kurt Hutten
2023-09-05 20:40:50 +10:00
committed by GitHub
parent cccedceea0
commit ad3f0fda6a
4 changed files with 1 additions and 14 deletions

View File

@ -81,8 +81,6 @@ export function App() {
setIsStreamReady,
isStreamReady,
isMouseDownInStream,
cmdId,
setCmdId,
formatCode,
openPanes,
setOpenPanes,
@ -117,8 +115,6 @@ export function App() {
isStreamReady: s.isStreamReady,
setIsStreamReady: s.setIsStreamReady,
isMouseDownInStream: s.isMouseDownInStream,
cmdId: s.cmdId,
setCmdId: s.setCmdId,
formatCode: s.formatCode,
addKCLError: s.addKCLError,
openPanes: s.openPanes,
@ -396,9 +392,8 @@ export function App() {
const interaction = ctrlKey ? 'zoom' : shiftKey ? 'pan' : 'rotate'
const newCmdId = uuidv4()
setCmdId(newCmdId)
if (cmdId && isMouseDownInStream) {
if (isMouseDownInStream) {
debounceSocketSend({
type: 'modeling_cmd_req',
cmd: {

View File

@ -17,7 +17,6 @@ export const Stream = ({ className = '' }) => {
mediaStream,
engineCommandManager,
setIsMouseDownInStream,
setCmdId,
didDragInStream,
setDidDragInStream,
streamDimensions,
@ -27,7 +26,6 @@ export const Stream = ({ className = '' }) => {
isMouseDownInStream: s.isMouseDownInStream,
setIsMouseDownInStream: s.setIsMouseDownInStream,
fileId: s.fileId,
setCmdId: s.setCmdId,
didDragInStream: s.didDragInStream,
setDidDragInStream: s.setDidDragInStream,
streamDimensions: s.streamDimensions,
@ -59,7 +57,6 @@ export const Stream = ({ className = '' }) => {
console.log('click', x, y)
const newId = uuidv4()
setCmdId(newId)
const interaction = ctrlKey ? 'pan' : 'rotate'

View File

@ -39,7 +39,6 @@ class MockEngineCommandManager {
if (commandStr === undefined) {
throw new Error('commandStr is undefined')
}
console.log('sendModelingCommandFromWasm', id, rangeStr, commandStr)
const command: EngineCommand = JSON.parse(commandStr)
const range: SourceRange = JSON.parse(rangeStr)

View File

@ -162,8 +162,6 @@ export interface StoreState {
setIsMouseDownInStream: (isMouseDownInStream: boolean) => void
didDragInStream: boolean
setDidDragInStream: (didDragInStream: boolean) => void
cmdId?: string
setCmdId: (cmdId: string) => void
fileId: string
setFileId: (fileId: string) => void
streamDimensions: { streamWidth: number; streamHeight: number }
@ -350,8 +348,6 @@ export const useStore = create<StoreState>()(
set({ didDragInStream })
},
// For stream event handling
cmdId: undefined,
setCmdId: (cmdId) => set({ cmdId }),
fileId: '',
setFileId: (fileId) => set({ fileId }),
streamDimensions: { streamWidth: 1280, streamHeight: 720 },