|
@@ -58,7 +58,7 @@ const context = vm.createContext({
|
|
|
overlapExpandedGroup: '', overlapPreviewGroup: '', lastPicked: null,
|
|
overlapExpandedGroup: '', overlapPreviewGroup: '', lastPicked: null,
|
|
|
collapseOverlap() {}, paintPicked() {}, expandOverlap() {},
|
|
collapseOverlap() {}, paintPicked() {}, expandOverlap() {},
|
|
|
})
|
|
})
|
|
|
-vm.runInContext(`${functions(service, ['onPipelinePick', 'pickPipelineAt', 'pickDeviceOrPointAt'])}\nglobalThis.api = { onPipelinePick, pickPipelineAt, pickDeviceOrPointAt };`, context)
|
|
|
|
|
|
|
+vm.runInContext(`${functions(service, ['onPipelinePick', 'pickPipelineAt', 'pickDeviceOrPointAt', 'dispatchPickResult'])}\nglobalThis.api = { onPipelinePick, pickPipelineAt, pickDeviceOrPointAt };`, context)
|
|
|
// Execute the actual service registration, preserving its device/point-first branch.
|
|
// Execute the actual service registration, preserving its device/point-first branch.
|
|
|
const registration = service.match(/record\.detachPickInput = attachPointPick\(record\.host,[\s\S]*?\n \}\)/)?.[0]
|
|
const registration = service.match(/record\.detachPickInput = attachPointPick\(record\.host,[\s\S]*?\n \}\)/)?.[0]
|
|
|
assert.ok(registration, 'map must attach its pointer input')
|
|
assert.ok(registration, 'map must attach its pointer input')
|
|
@@ -140,7 +140,10 @@ assert.equal(focusedDevice, 'D-real')
|
|
|
await Vue.nextTick(); await Vue.nextTick()
|
|
await Vue.nextTick(); await Vue.nextTick()
|
|
|
assert.equal(deviceStore.aggregate.data.deviceCode, 'D-real')
|
|
assert.equal(deviceStore.aggregate.data.deviceCode, 'D-real')
|
|
|
assert.equal(find(root, 'data-device-detail').props['data-device-detail'], 'D-real')
|
|
assert.equal(find(root, 'data-device-detail').props['data-device-detail'], 'D-real')
|
|
|
|
|
+// 场景图标点击同样必须触发镜头定位(此前只有清单点击会 focus,导致「相机没动」)。
|
|
|
|
|
+focusedDevice = null
|
|
|
devicePick(demoDevice)
|
|
devicePick(demoDevice)
|
|
|
|
|
+assert.equal(focusedDevice, 'D-real', '场景图标点击也必须调用 focusDevice')
|
|
|
await Vue.nextTick(); await Vue.nextTick()
|
|
await Vue.nextTick(); await Vue.nextTick()
|
|
|
assert.equal(find(root, 'data-device-detail').props['data-device-detail'], 'D-real', '场景图标射线点击直接打开设备详情')
|
|
assert.equal(find(root, 'data-device-detail').props['data-device-detail'], 'D-real', '场景图标射线点击直接打开设备详情')
|
|
|
assert.equal(find(root, 'data-device-list') !== undefined, true, '详情覆盖层打开时清单仍保留于其下')
|
|
assert.equal(find(root, 'data-device-list') !== undefined, true, '详情覆盖层打开时清单仍保留于其下')
|