Skip to content

Commit 6f9f048

Browse files
authored
[3d] fix wrong hasRecording status (#3995)
1 parent 768faee commit 6f9f048

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/components/load3d/Load3D.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ const handleStopRecording = () => {
150150
if (load3DSceneRef.value?.load3d) {
151151
load3DSceneRef.value.load3d.stopRecording()
152152
isRecording.value = false
153-
hasRecording.value = true
154153
recordingDuration.value = load3DSceneRef.value.load3d.getRecordingDuration()
154+
hasRecording.value = recordingDuration.value > 0
155155
}
156156
}
157157
@@ -294,8 +294,8 @@ const listenRecordingStatusChange = (value: boolean) => {
294294
isRecording.value = value
295295
296296
if (!value && load3DSceneRef.value?.load3d) {
297-
hasRecording.value = true
298297
recordingDuration.value = load3DSceneRef.value.load3d.getRecordingDuration()
298+
hasRecording.value = recordingDuration.value > 0
299299
}
300300
}
301301

src/components/load3d/Load3DAnimation.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,8 @@ const handleStopRecording = () => {
168168
if (sceneRef?.load3d) {
169169
sceneRef.load3d.stopRecording()
170170
isRecording.value = false
171-
hasRecording.value = true
172171
recordingDuration.value = sceneRef.load3d.getRecordingDuration()
172+
hasRecording.value = recordingDuration.value > 0
173173
}
174174
}
175175
@@ -197,8 +197,8 @@ const listenRecordingStatusChange = (value: boolean) => {
197197
if (!value) {
198198
const sceneRef = load3DAnimationSceneRef.value?.load3DSceneRef
199199
if (sceneRef?.load3d) {
200-
hasRecording.value = true
201200
recordingDuration.value = sceneRef.load3d.getRecordingDuration()
201+
hasRecording.value = recordingDuration.value > 0
202202
}
203203
}
204204
}

src/components/load3d/controls/RecordingControls.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ const emit = defineEmits<{
9999
}>()
100100
101101
const resizeNodeMatchOutput = () => {
102-
console.log('resizeNodeMatchOutput')
103-
104102
const outputWidth = node.widgets?.find((w) => w.name === 'width')
105103
const outputHeight = node.widgets?.find((w) => w.name === 'height')
106104

0 commit comments

Comments
 (0)