refactor: rename zoom commands to use camelCase in API and PTZ control
This commit is contained in:
@ -277,8 +277,8 @@ SRS-SIP 是一个基于 GB28181 协议的视频监控系统,提供设备管理
|
||||
- `down`: 向下
|
||||
- `left`: 向左
|
||||
- `right`: 向右
|
||||
- `zoom_in`: 放大
|
||||
- `zoom_out`: 缩小
|
||||
- `zoomin`: 放大
|
||||
- `zoomout`: 缩小
|
||||
- `stop`: 停止
|
||||
- `speed`: 控制速度(1-9)
|
||||
|
||||
|
||||
@ -162,7 +162,7 @@ const isDisabled = computed(() => !props.activeWindow)
|
||||
<el-button
|
||||
class="zoom-btn"
|
||||
:disabled="isDisabled"
|
||||
@mousedown="handlePtzStart('zoom_in')"
|
||||
@mousedown="handlePtzStart('zoomin')"
|
||||
@mouseup="handlePtzStop"
|
||||
@mouseleave="handlePtzStop"
|
||||
>
|
||||
@ -172,7 +172,7 @@ const isDisabled = computed(() => !props.activeWindow)
|
||||
<el-button
|
||||
class="zoom-btn"
|
||||
:disabled="isDisabled"
|
||||
@mousedown="handlePtzStart('zoom_out')"
|
||||
@mousedown="handlePtzStart('zoomout')"
|
||||
@mouseup="handlePtzStop"
|
||||
@mouseleave="handlePtzStop"
|
||||
>
|
||||
|
||||
@ -15,8 +15,6 @@ var (
|
||||
"upleft": 10,
|
||||
"zoomin": 16,
|
||||
"zoomout": 32,
|
||||
"zoom_in": 16,
|
||||
"zoom_out": 32,
|
||||
}
|
||||
|
||||
ptzSpeedMap = map[string]uint8{
|
||||
|
||||
@ -159,7 +159,7 @@ func TestPTZCmdMap(t *testing.T) {
|
||||
// 验证所有预定义的命令都存在
|
||||
expectedCommands := []string{
|
||||
"stop", "right", "left", "down", "downright", "downleft",
|
||||
"up", "upright", "upleft", "zoomin", "zoomout", "zoom_in", "zoom_out",
|
||||
"up", "upright", "upleft", "zoomin", "zoomout",
|
||||
}
|
||||
|
||||
for _, cmd := range expectedCommands {
|
||||
|
||||
Reference in New Issue
Block a user