@ray-js/robot-map-sdk 0.0.9-beta.3 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/dist/constant/methods.js +1 -1
  2. package/dist/index.d.ts +177 -6
  3. package/dist/index.rjs.js +1 -1
  4. package/dist-app/assets/doubleBed-CzextF6m.png +0 -0
  5. package/dist-app/assets/index-BzBtiwcY.js +1 -0
  6. package/dist-app/index.html +1 -1
  7. package/dist-docs/404.html +2 -2
  8. package/dist-docs/assets/{app.BhvJYn39.js → app.BJnAJzet.js} +1 -1
  9. package/dist-docs/assets/chunks/@localSearchIndexroot.HZmZuAtg.js +1 -0
  10. package/dist-docs/assets/chunks/{VPLocalSearchBox.B8QXL3Iw.js → VPLocalSearchBox.D9iYIKMO.js} +1 -1
  11. package/dist-docs/assets/chunks/{theme.Nx563P9F.js → theme.D78lSkQK.js} +2 -2
  12. package/dist-docs/assets/{guide_advanced-usage.md.BQuNyTwG.js → guide_advanced-usage.md.BPrKHNKt.js} +81 -3
  13. package/dist-docs/assets/{guide_advanced-usage.md.BQuNyTwG.lean.js → guide_advanced-usage.md.BPrKHNKt.lean.js} +1 -1
  14. package/dist-docs/assets/{guide_getting-started.md.COeLD2eD.js → guide_getting-started.md.Zvm4buzY.js} +1 -1
  15. package/dist-docs/assets/plans_2026-03-04-detected-objects-visibility-design.md.530AI9zE.js +1 -0
  16. package/dist-docs/assets/plans_2026-03-04-detected-objects-visibility-design.md.530AI9zE.lean.js +1 -0
  17. package/dist-docs/assets/plans_2026-03-04-show-detected-objects-implementation-plan.md.foeG7qiK.js +34 -0
  18. package/dist-docs/assets/plans_2026-03-04-show-detected-objects-implementation-plan.md.foeG7qiK.lean.js +1 -0
  19. package/dist-docs/assets/records_bugs_2026-02-28-fix-pixi-bindgroup-webgpu-snapshot-whitescreen-bugfix.md.BT3816jW.js +2 -0
  20. package/dist-docs/assets/records_bugs_2026-02-28-fix-pixi-bindgroup-webgpu-snapshot-whitescreen-bugfix.md.BT3816jW.lean.js +1 -0
  21. package/dist-docs/assets/records_plans_2026-03-02-furniture-feature-plan.md.DkXKivuL.js +1 -0
  22. package/dist-docs/assets/records_plans_2026-03-02-furniture-feature-plan.md.DkXKivuL.lean.js +1 -0
  23. package/dist-docs/assets/{reference_callbacks.md.CZ8IiuH-.js → reference_callbacks.md.CwvDSJWk.js} +2 -2
  24. package/dist-docs/assets/{reference_callbacks.md.CZ8IiuH-.lean.js → reference_callbacks.md.CwvDSJWk.lean.js} +1 -1
  25. package/dist-docs/assets/{reference_config.md.B0jHOsqG.js → reference_config.md.CK4ueBig.js} +24 -3
  26. package/dist-docs/assets/reference_config.md.CK4ueBig.lean.js +1 -0
  27. package/dist-docs/assets/{reference_methods.md.CEJFnJJg.js → reference_methods.md.CL2sjTJ7.js} +8 -3
  28. package/dist-docs/assets/reference_methods.md.CL2sjTJ7.lean.js +1 -0
  29. package/dist-docs/assets/{reference_runtime.md.BnT09w_m.js → reference_runtime.md.aDpGKfHs.js} +3 -2
  30. package/dist-docs/assets/{reference_runtime.md.BnT09w_m.lean.js → reference_runtime.md.aDpGKfHs.lean.js} +1 -1
  31. package/dist-docs/assets/{reference_types.md.CL_VFfB8.js → reference_types.md.D2IglsHQ.js} +9 -2
  32. package/dist-docs/assets/{reference_types.md.CL_VFfB8.lean.js → reference_types.md.D2IglsHQ.lean.js} +1 -1
  33. package/dist-docs/guide/advanced-usage.html +84 -6
  34. package/dist-docs/guide/concepts.html +3 -3
  35. package/dist-docs/guide/getting-started.html +5 -5
  36. package/dist-docs/guide/mcp.html +3 -3
  37. package/dist-docs/hashmap.json +1 -1
  38. package/dist-docs/index.html +3 -3
  39. package/dist-docs/plans/2026-03-04-detected-objects-visibility-design.html +25 -0
  40. package/dist-docs/plans/2026-03-04-show-detected-objects-implementation-plan.html +58 -0
  41. package/dist-docs/records/bugs/2026-02-28-fix-pixi-bindgroup-webgpu-snapshot-whitescreen-bugfix.html +26 -0
  42. package/dist-docs/records/plans/2026-03-02-furniture-feature-plan.html +25 -0
  43. package/dist-docs/reference/callbacks.html +5 -5
  44. package/dist-docs/reference/config.html +27 -6
  45. package/dist-docs/reference/data.html +3 -3
  46. package/dist-docs/reference/methods.html +11 -6
  47. package/dist-docs/reference/runtime.html +6 -5
  48. package/dist-docs/reference/types.html +12 -5
  49. package/dist-docs/reference/utils.html +3 -3
  50. package/package.json +2 -2
  51. package/dist-app/assets/index-B29F5iw3.js +0 -1
  52. package/dist-docs/assets/chunks/@localSearchIndexroot.BcHnsGL-.js +0 -1
  53. package/dist-docs/assets/reference_config.md.B0jHOsqG.lean.js +0 -1
  54. package/dist-docs/assets/reference_methods.md.CEJFnJJg.lean.js +0 -1
  55. /package/dist-docs/assets/{guide_getting-started.md.COeLD2eD.lean.js → guide_getting-started.md.Zvm4buzY.lean.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{_ as i,c as a,o as n,ag as p}from"./chunks/framework.DRADY2L-.js";const g=JSON.parse('{"title":"快速开始","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started.md","filePath":"guide/getting-started.md","lastUpdated":1770804529000}'),h={name:"guide/getting-started.md"};function l(k,s,t,e,E,r){return n(),a("div",null,[...s[0]||(s[0]=[p(`<h1 id="快速开始" tabindex="-1">快速开始 <a class="header-anchor" href="#快速开始" aria-label="Permalink to &quot;快速开始&quot;">​</a></h1><p>Tuya Robot Map 提供了开箱即用的 React 组件,专为扫地机器人应用设计。</p><h2 id="安装" tabindex="-1">安装 <a class="header-anchor" href="#安装" aria-label="Permalink to &quot;安装&quot;">​</a></h2><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-Lrp6d" id="tab-7LMBL_P" checked><label data-title="yarn" for="tab-7LMBL_P">yarn</label><input type="radio" name="group-Lrp6d" id="tab-2AdR0uM"><label data-title="npm" for="tab-2AdR0uM">npm</label></div><div class="blocks"><div class="language-bash vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">yarn</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> add</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> @ray-js/robot-map</span></span></code></pre></div><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">npm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> @ray-js/robot-map</span></span></code></pre></div></div></div><h2 id="数据传入" tabindex="-1">数据传入 <a class="header-anchor" href="#数据传入" aria-label="Permalink to &quot;数据传入&quot;">​</a></h2><p>仅需传入几个基本的数据props,即可完成地图的呈现。</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-8AAbS" id="tab-U8X0S87" checked><label data-title="点阵协议地图数据" for="tab-U8X0S87">点阵协议地图数据</label><input type="radio" name="group-8AAbS" id="tab-pTDZ5mO"><label data-title="结构化协议地图数据" for="tab-pTDZ5mO">结构化协议地图数据</label></div><div class="blocks"><div class="language-tsx vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">tsx</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> React, { useMemo } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;react&#39;</span></span>
1
+ import{_ as i,c as a,o as n,ag as p}from"./chunks/framework.DRADY2L-.js";const g=JSON.parse('{"title":"快速开始","description":"","frontmatter":{},"headers":[],"relativePath":"guide/getting-started.md","filePath":"guide/getting-started.md","lastUpdated":1770804529000}'),h={name:"guide/getting-started.md"};function l(k,s,t,e,E,r){return n(),a("div",null,[...s[0]||(s[0]=[p(`<h1 id="快速开始" tabindex="-1">快速开始 <a class="header-anchor" href="#快速开始" aria-label="Permalink to &quot;快速开始&quot;">​</a></h1><p>Tuya Robot Map 提供了开箱即用的 React 组件,专为扫地机器人应用设计。</p><h2 id="安装" tabindex="-1">安装 <a class="header-anchor" href="#安装" aria-label="Permalink to &quot;安装&quot;">​</a></h2><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-oSPQR" id="tab-9P_-u_S" checked><label data-title="yarn" for="tab-9P_-u_S">yarn</label><input type="radio" name="group-oSPQR" id="tab-XRup7fd"><label data-title="npm" for="tab-XRup7fd">npm</label></div><div class="blocks"><div class="language-bash vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">yarn</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> add</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> @ray-js/robot-map</span></span></code></pre></div><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">npm</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> install</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> @ray-js/robot-map</span></span></code></pre></div></div></div><h2 id="数据传入" tabindex="-1">数据传入 <a class="header-anchor" href="#数据传入" aria-label="Permalink to &quot;数据传入&quot;">​</a></h2><p>仅需传入几个基本的数据props,即可完成地图的呈现。</p><div class="vp-code-group vp-adaptive-theme"><div class="tabs"><input type="radio" name="group-WRKwR" id="tab-NOIINpe" checked><label data-title="点阵协议地图数据" for="tab-NOIINpe">点阵协议地图数据</label><input type="radio" name="group-WRKwR" id="tab-VuIqaew"><label data-title="结构化协议地图数据" for="tab-VuIqaew">结构化协议地图数据</label></div><div class="blocks"><div class="language-tsx vp-adaptive-theme active"><button title="Copy Code" class="copy"></button><span class="lang">tsx</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> React, { useMemo } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;react&#39;</span></span>
2
2
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { RobotMap } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;@ray-js/robot-map&#39;</span></span>
3
3
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { decodeRoomProperties } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;@ray-js/robot-map&#39;</span></span>
4
4
  <span class="line"></span>
@@ -0,0 +1 @@
1
+ import{_ as t,c as i,o as a,ag as o}from"./chunks/framework.DRADY2L-.js";const p=JSON.parse('{"title":"Detected objects visibility toggle design","description":"","frontmatter":{},"headers":[],"relativePath":"plans/2026-03-04-detected-objects-visibility-design.md","filePath":"plans/2026-03-04-detected-objects-visibility-design.md","lastUpdated":1772624993000}'),d={name:"plans/2026-03-04-detected-objects-visibility-design.md"};function c(s,e,l,n,r,u){return a(),i("div",null,[...e[0]||(e[0]=[o('<h1 id="detected-objects-visibility-toggle-design" tabindex="-1">Detected objects visibility toggle design <a class="header-anchor" href="#detected-objects-visibility-toggle-design" aria-label="Permalink to &quot;Detected objects visibility toggle design&quot;">​</a></h1><h2 id="background" tabindex="-1">Background <a class="header-anchor" href="#background" aria-label="Permalink to &quot;Background&quot;">​</a></h2><p>The SDK already supports rendering detected objects through <code>drawDetectedObjects()</code>, but it does not provide a runtime switch to hide or show them. This design adds <code>runtime.showDetectedObjects</code> so callers can toggle visibility without changing detected object data.</p><h2 id="goal-and-scope" tabindex="-1">Goal and scope <a class="header-anchor" href="#goal-and-scope" aria-label="Permalink to &quot;Goal and scope&quot;">​</a></h2><p>This design defines how to add a runtime visibility toggle for detected objects.</p><ul><li>Add <code>runtime.showDetectedObjects</code> with a default value of <code>true</code>.</li><li>Let consumers hide and show all detected objects at runtime.</li><li>Keep existing detected object data synchronization behavior unchanged.</li></ul><p>Out of scope:</p><ul><li>Per-object visibility flags.</li><li>New public methods for detected object visibility.</li><li>Data deletion when visibility is turned off.</li></ul><h2 id="approaches-considered" tabindex="-1">Approaches considered <a class="header-anchor" href="#approaches-considered" aria-label="Permalink to &quot;Approaches considered&quot;">​</a></h2><p>This section summarizes three options and their trade-offs.</p><ol><li><p><strong>Recommended: manager-level runtime subscription</strong></p><ul><li>Add <code>showDetectedObjects</code> to runtime types and defaults.</li><li>Subscribe in <code>DetectedObjectManager</code> and toggle <code>LAYER_DETECTED_OBJECT.visible</code>.</li><li>Pros: aligns with current manager pattern, minimal code impact, no unnecessary object recreation.</li><li>Cons: requires one additional subscription and cleanup path.</li></ul></li><li><p><strong>MapApplication-level runtime dispatch</strong></p><ul><li>Detect runtime changes in <code>MapApplication.updateRuntime()</code> and call a manager method.</li><li>Pros: centralized runtime handling.</li><li>Cons: increases coupling and makes <code>updateRuntime()</code> heavier over time.</li></ul></li><li><p><strong>Per-object subscription in DetectedObject component</strong></p><ul><li>Each detected object subscribes to runtime visibility updates.</li><li>Pros: local component autonomy.</li><li>Cons: scales poorly with many objects and adds avoidable subscription overhead.</li></ul></li></ol><h2 id="selected-design" tabindex="-1">Selected design <a class="header-anchor" href="#selected-design" aria-label="Permalink to &quot;Selected design&quot;">​</a></h2><p>The selected design uses option 1: manager-level runtime subscription.</p><h3 id="runtime-schema-and-defaults" tabindex="-1">Runtime schema and defaults <a class="header-anchor" href="#runtime-schema-and-defaults" aria-label="Permalink to &quot;Runtime schema and defaults&quot;">​</a></h3><p>Add a new runtime field:</p><ul><li><code>RuntimeConfig.showDetectedObjects: boolean</code></li><li><code>DEFAULT_RUNTIME_CONFIG.showDetectedObjects = true</code></li></ul><p>This keeps backward compatibility because current behavior is to render detected objects by default.</p><h3 id="rendering-control-point" tabindex="-1">Rendering control point <a class="header-anchor" href="#rendering-control-point" aria-label="Permalink to &quot;Rendering control point&quot;">​</a></h3><p><code>DetectedObjectManager</code> becomes the single control point for this visibility state.</p><ul><li>On initialization, subscribe to <code>runtime.showDetectedObjects</code>.</li><li>In the callback, read <code>LAYER_DETECTED_OBJECT</code> from <code>AppContainer</code> and set the layer visibility.</li><li>Keep <code>drawDetectedObjects()</code> behavior unchanged for create/update/remove data flow.</li></ul><p>This means visibility control is independent from data synchronization.</p><h3 id="lifecycle-and-cleanup" tabindex="-1">Lifecycle and cleanup <a class="header-anchor" href="#lifecycle-and-cleanup" aria-label="Permalink to &quot;Lifecycle and cleanup&quot;">​</a></h3><p><code>DetectedObjectManager.destroy()</code> must also unsubscribe from the new runtime listener to avoid stale callbacks.</p><h2 id="impacted-files" tabindex="-1">Impacted files <a class="header-anchor" href="#impacted-files" aria-label="Permalink to &quot;Impacted files&quot;">​</a></h2><p>This change affects the following files.</p><ul><li><code>src/core/@types/index.d.ts</code><ul><li>Add <code>showDetectedObjects</code> to <code>RuntimeConfig</code>.</li></ul></li><li><code>src/core/constant/config.ts</code><ul><li>Add <code>showDetectedObjects: true</code> to <code>DEFAULT_RUNTIME_CONFIG</code>.</li></ul></li><li><code>src/core/managers/DetectedObjectManager.ts</code><ul><li>Add runtime subscription and layer visibility toggle.</li><li>Add unsubscribe cleanup in <code>destroy()</code>.</li></ul></li><li><code>src/app/debugTools/index.ts</code> (optional) <ul><li>Add a debug toggle action for <code>showDetectedObjects</code>.</li></ul></li></ul><h2 id="edge-cases" tabindex="-1">Edge cases <a class="header-anchor" href="#edge-cases" aria-label="Permalink to &quot;Edge cases&quot;">​</a></h2><p>The implementation handles these expected cases.</p><ul><li>If the detected object layer is not available yet, the visibility callback exits safely.</li><li>If visibility is off and new detected object data arrives, manager data state still updates, and objects become visible immediately after toggling on.</li></ul><h2 id="verification-strategy" tabindex="-1">Verification strategy <a class="header-anchor" href="#verification-strategy" aria-label="Permalink to &quot;Verification strategy&quot;">​</a></h2><p>Per user request, this task does not include a dedicated test execution step.</p><h2 id="next-steps" tabindex="-1">Next steps <a class="header-anchor" href="#next-steps" aria-label="Permalink to &quot;Next steps&quot;">​</a></h2><p>After this design is accepted, create an implementation plan and then apply the code changes in the impacted files.</p>',33)])])}const b=t(d,[["render",c]]);export{p as __pageData,b as default};
@@ -0,0 +1 @@
1
+ import{_ as t,c as i,o as a,ag as o}from"./chunks/framework.DRADY2L-.js";const p=JSON.parse('{"title":"Detected objects visibility toggle design","description":"","frontmatter":{},"headers":[],"relativePath":"plans/2026-03-04-detected-objects-visibility-design.md","filePath":"plans/2026-03-04-detected-objects-visibility-design.md","lastUpdated":1772624993000}'),d={name:"plans/2026-03-04-detected-objects-visibility-design.md"};function c(s,e,l,n,r,u){return a(),i("div",null,[...e[0]||(e[0]=[o("",33)])])}const b=t(d,[["render",c]]);export{p as __pageData,b as default};
@@ -0,0 +1,34 @@
1
+ import{_ as i,c as e,o as t,ag as a}from"./chunks/framework.DRADY2L-.js";const c=JSON.parse('{"title":"Show detected objects runtime toggle implementation plan","description":"","frontmatter":{},"headers":[],"relativePath":"plans/2026-03-04-show-detected-objects-implementation-plan.md","filePath":"plans/2026-03-04-show-detected-objects-implementation-plan.md","lastUpdated":1772624993000}'),n={name:"plans/2026-03-04-show-detected-objects-implementation-plan.md"};function l(p,s,h,d,r,o){return t(),e("div",null,[...s[0]||(s[0]=[a(`<h1 id="show-detected-objects-runtime-toggle-implementation-plan" tabindex="-1">Show detected objects runtime toggle implementation plan <a class="header-anchor" href="#show-detected-objects-runtime-toggle-implementation-plan" aria-label="Permalink to &quot;Show detected objects runtime toggle implementation plan&quot;">​</a></h1><blockquote><p><strong>For Claude:</strong> REQUIRED SUB-SKILL: Use superpowers:executing-plans to implement this plan task-by-task.</p></blockquote><p><strong>Goal:</strong> Add <code>runtime.showDetectedObjects</code> to control detected object visibility at runtime, with default behavior unchanged (<code>true</code>).</p><p><strong>Architecture:</strong> Extend runtime schema and defaults, then subscribe to the new runtime field inside <code>DetectedObjectManager</code> to toggle <code>LAYER_DETECTED_OBJECT.visible</code>. Keep <code>drawDetectedObjects()</code> data sync logic unchanged so visibility control stays independent from object CRUD.</p><p><strong>Tech Stack:</strong> TypeScript, PIXI.js 8 layer containers, Valtio <code>subscribeKey</code>, VitePress docs.</p><hr><h2 id="constraints-and-scope" tabindex="-1">Constraints and scope <a class="header-anchor" href="#constraints-and-scope" aria-label="Permalink to &quot;Constraints and scope&quot;">​</a></h2><p>This plan follows these constraints:</p><ul><li>Implement only the requested feature.</li><li>Do not add or run dedicated feature tests (explicit user request).</li><li>Keep project-required static verification (<code>npm run lint</code>, <code>npx tsc --noEmit</code>).</li><li>Do not create commits unless the user explicitly requests a commit.</li></ul><h2 id="task-1-add-runtime-type-field" tabindex="-1">Task 1: Add runtime type field <a class="header-anchor" href="#task-1-add-runtime-type-field" aria-label="Permalink to &quot;Task 1: Add runtime type field&quot;">​</a></h2><p><strong>Files:</strong></p><ul><li>Modify: <code>src/core/@types/index.d.ts:639-651</code></li></ul><p><strong>Step 1: Add <code>showDetectedObjects</code> to <code>RuntimeConfig</code></strong></p><p>Insert a new boolean field near existing visibility toggles:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;">/** 是否显示 AI 检测物体 */</span></span>
2
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">showDetectedObjects</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: boolean</span></span></code></pre></div><p><strong>Step 2: Keep property order stable in visibility section</strong></p><p>Place <code>showDetectedObjects</code> after <code>showCarpet</code> so related runtime flags stay clustered.</p><h2 id="task-2-add-runtime-default-value" tabindex="-1">Task 2: Add runtime default value <a class="header-anchor" href="#task-2-add-runtime-default-value" aria-label="Permalink to &quot;Task 2: Add runtime default value&quot;">​</a></h2><p><strong>Files:</strong></p><ul><li>Modify: <code>src/core/constant/config.ts:635-651</code></li></ul><p><strong>Step 1: Add default value in <code>DEFAULT_RUNTIME_CONFIG</code></strong></p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">showCarpet</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
3
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">showDetectedObjects</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">true</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
4
+ <span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">showChargingStationRing</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">false</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span></code></pre></div><p><strong>Step 2: Keep backward-compatible default behavior</strong></p><p>Ensure the default is <code>true</code> so existing integrations continue to display objects without additional config.</p><h2 id="task-3-add-manager-level-visibility-subscription" tabindex="-1">Task 3: Add manager-level visibility subscription <a class="header-anchor" href="#task-3-add-manager-level-visibility-subscription" aria-label="Permalink to &quot;Task 3: Add manager-level visibility subscription&quot;">​</a></h2><p><strong>Files:</strong></p><ul><li>Modify: <code>src/core/managers/DetectedObjectManager.ts:1-121</code></li></ul><p><strong>Step 1: Add Valtio subscription import</strong></p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { subscribeKey } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;valtio/vanilla/utils&#39;</span></span></code></pre></div><p><strong>Step 2: Add unsubscribe holder</strong></p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">private </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">unsubscribeShowDetectedObjects</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: (() </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=&gt;</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> void</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">|</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> null</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> null</span></span></code></pre></div><p><strong>Step 3: Initialize layer visibility from runtime in constructor</strong></p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">constructor</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(private appService: AppService) {</span></span>
5
+ <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> this</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">applyLayerVisibility</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">this</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.appService.runtime.showDetectedObjects)</span></span>
6
+ <span class="line"></span>
7
+ <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> this</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.unsubscribeShowDetectedObjects </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> subscribeKey</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
8
+ <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> this</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.appService.runtime,</span></span>
9
+ <span class="line"><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;showDetectedObjects&#39;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
10
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">showDetectedObjects</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> boolean</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">) </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=&gt;</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
11
+ <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> this</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">applyLayerVisibility</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(showDetectedObjects)</span></span>
12
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> },</span></span>
13
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> )</span></span>
14
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p><strong>Step 4: Add private layer visibility helper</strong></p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">private </span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">applyLayerVisibility</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(visible: boolean): </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">void</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
15
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> const</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> detectedObjectLayer</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> =</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> this</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.appService.appContainer.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">getLayer</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span></span>
16
+ <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> LAYER_DETECTED_OBJECT</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">,</span></span>
17
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> )</span></span>
18
+ <span class="line"></span>
19
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (detectedObjectLayer) {</span></span>
20
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> detectedObjectLayer.visible </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> visible</span></span>
21
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
22
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><p><strong>Step 5: Keep draw flow unchanged</strong></p><p>Do not add early returns in <code>drawDetectedObjects()</code>. Hidden state must not prevent object data from being created or updated.</p><p><strong>Step 6: Clean up subscription in <code>destroy()</code></strong></p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">destroy</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(): </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">void</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> {</span></span>
23
+ <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;"> if</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> (</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">this</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.unsubscribeShowDetectedObjects) {</span></span>
24
+ <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> this</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">unsubscribeShowDetectedObjects</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span></span>
25
+ <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> this</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.unsubscribeShowDetectedObjects </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> null</span></span>
26
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> }</span></span>
27
+ <span class="line"></span>
28
+ <span class="line"><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> this</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">.</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">clearAllDetectedObjects</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span></span>
29
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="task-4-update-runtime-reference-documentation" tabindex="-1">Task 4: Update runtime reference documentation <a class="header-anchor" href="#task-4-update-runtime-reference-documentation" aria-label="Permalink to &quot;Task 4: Update runtime reference documentation&quot;">​</a></h2><p><strong>Files:</strong></p><ul><li>Modify: <code>docs/reference/runtime.md</code></li></ul><p><strong>Step 1: Add <code>showDetectedObjects</code> entry</strong></p><p>Add a new section consistent with existing runtime docs style:</p><div class="language-md vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">md</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#005CC5;--shiki-light-font-weight:bold;--shiki-dark:#79B8FF;--shiki-dark-font-weight:bold;">## showDetectedObjects</span></span>
30
+ <span class="line"></span>
31
+ <span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">-</span><span style="--shiki-light:#24292E;--shiki-light-font-weight:bold;--shiki-dark:#E1E4E8;--shiki-dark-font-weight:bold;"> **类型**</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\`boolean\`</span></span>
32
+ <span class="line"><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">-</span><span style="--shiki-light:#24292E;--shiki-light-font-weight:bold;--shiki-dark:#E1E4E8;--shiki-dark-font-weight:bold;"> **默认值**</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">: </span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;">\`true\`</span></span>
33
+ <span class="line"></span>
34
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">是否显示 AI 检测物体。</span></span></code></pre></div><p><strong>Step 2: Update runtime sample block</strong></p><p>Add <code>showDetectedObjects: true</code> to the top sample <code>runtime</code> object so the new field is discoverable.</p><h2 id="task-5-add-traceability-record" tabindex="-1">Task 5: Add traceability record <a class="header-anchor" href="#task-5-add-traceability-record" aria-label="Permalink to &quot;Task 5: Add traceability record&quot;">​</a></h2><p><strong>Files:</strong></p><ul><li>Create: <code>docs/records/plans/2026-03-04-detected-objects-visibility-plan.md</code></li></ul><p><strong>Step 1: Write plan record with required sections</strong></p><p>Include:</p><ol><li>Background.</li><li>Goal and scope.</li><li>Chosen approach.</li><li>Impacted files/modules.</li><li>Verification checklist.</li></ol><p><strong>Step 2: Keep record language in English</strong></p><p>Follow repository traceability requirement for plan/bug records.</p><h2 id="task-6-run-required-verification-commands" tabindex="-1">Task 6: Run required verification commands <a class="header-anchor" href="#task-6-run-required-verification-commands" aria-label="Permalink to &quot;Task 6: Run required verification commands&quot;">​</a></h2><p><strong>Files:</strong></p><ul><li>Modify: none</li></ul><p><strong>Step 1: Run lint</strong></p><p>Run: <code>npm run lint</code> Expected: no new lint errors.</p><p><strong>Step 2: Run TypeScript check</strong></p><p>Run: <code>npx tsc --noEmit</code> Expected: no new type errors.</p><h2 id="task-7-final-review-checklist" tabindex="-1">Task 7: Final review checklist <a class="header-anchor" href="#task-7-final-review-checklist" aria-label="Permalink to &quot;Task 7: Final review checklist&quot;">​</a></h2><p><strong>Files:</strong></p><ul><li>Modify: none</li></ul><p><strong>Step 1: Confirm requested behavior</strong></p><p>Verify by inspection that:</p><ul><li><code>runtime.showDetectedObjects</code> exists and defaults to <code>true</code>.</li><li>Toggling runtime field changes <code>LAYER_DETECTED_OBJECT.visible</code>.</li><li>Existing detected object draw/update/remove logic is unchanged.</li></ul><p><strong>Step 2: Prepare summary for user</strong></p><p>Report changed files and behavior impact with file references.</p>`,70)])])}const g=i(n,[["render",l]]);export{c as __pageData,g as default};
@@ -0,0 +1 @@
1
+ import{_ as i,c as e,o as t,ag as a}from"./chunks/framework.DRADY2L-.js";const c=JSON.parse('{"title":"Show detected objects runtime toggle implementation plan","description":"","frontmatter":{},"headers":[],"relativePath":"plans/2026-03-04-show-detected-objects-implementation-plan.md","filePath":"plans/2026-03-04-show-detected-objects-implementation-plan.md","lastUpdated":1772624993000}'),n={name:"plans/2026-03-04-show-detected-objects-implementation-plan.md"};function l(p,s,h,d,r,o){return t(),e("div",null,[...s[0]||(s[0]=[a("",70)])])}const g=i(n,[["render",l]]);export{c as __pageData,g as default};
@@ -0,0 +1,2 @@
1
+ import{_ as o,c as i,o as s,ag as a}from"./chunks/framework.DRADY2L-.js";const u=JSON.parse('{"title":"2026-02-28 fix: Pixi WebGPU snapshot roomInfo white screen","description":"","frontmatter":{},"headers":[],"relativePath":"records/bugs/2026-02-28-fix-pixi-bindgroup-webgpu-snapshot-whitescreen-bugfix.md","filePath":"records/bugs/2026-02-28-fix-pixi-bindgroup-webgpu-snapshot-whitescreen-bugfix.md","lastUpdated":1772253529000}'),r={name:"records/bugs/2026-02-28-fix-pixi-bindgroup-webgpu-snapshot-whitescreen-bugfix.md"};function t(n,e,c,l,d,h){return s(),i("div",null,[...e[0]||(e[0]=[a(`<h1 id="_2026-02-28-fix-pixi-webgpu-snapshot-roominfo-white-screen" tabindex="-1">2026-02-28 fix: Pixi WebGPU snapshot roomInfo white screen <a class="header-anchor" href="#_2026-02-28-fix-pixi-webgpu-snapshot-roominfo-white-screen" aria-label="Permalink to &quot;2026-02-28 fix: Pixi WebGPU snapshot roomInfo white screen&quot;">​</a></h1><h2 id="background" tabindex="-1">Background <a class="header-anchor" href="#background" aria-label="Permalink to &quot;Background&quot;">​</a></h2><p>After upgrading <code>pixi.js</code> to <code>8.16.0</code>, the WebGPU rendering flow started failing in one specific sequence: call <code>snapshotByData</code>, then render room information in the main instance.</p><p>This record captures the reproduction path, root cause, fix, and regression checklist so future Pixi upgrades are easier to verify.</p><h2 id="symptom" tabindex="-1">Symptom <a class="header-anchor" href="#symptom" aria-label="Permalink to &quot;Symptom&quot;">​</a></h2><p>In the demo, run this sequence:</p><ol><li>Render either Raster Map or Structured Map.</li><li>Click <strong>Snapshot Other Map</strong> (this triggers <code>snapshotByData</code>).</li><li>Click <strong>Draw roomInfo</strong>.</li></ol><p>The map turns white and the console reports:</p><ul><li><code>BindGroupSystem._createBindGroup</code></li><li><code>Cannot read properties of null (reading &#39;0&#39;/&#39;2&#39;)</code></li></ul><h2 id="root-cause" tabindex="-1">Root cause <a class="header-anchor" href="#root-cause" aria-label="Permalink to &quot;Root cause&quot;">​</a></h2><p>The issue is in Pixi <code>BindGroup.setResource(resource, index)</code>.</p><p>When replacing a resource, the old logic incorrectly called <code>off(&#39;change&#39;)</code> on the <strong>new</strong> resource instead of the <strong>previous</strong> resource (<code>currentResource</code>). Because of this, stale listeners can survive on the old resource. After the old resource is destroyed, it can still trigger the current BindGroup callback and null out <code>resources[i]</code>, which later crashes WebGPU bind group creation.</p><h2 id="fix" tabindex="-1">Fix <a class="header-anchor" href="#fix" aria-label="Permalink to &quot;Fix&quot;">​</a></h2><p>The project patch updates both CJS and ESM files:</p><ul><li><code>node_modules/pixi.js/lib/rendering/renderers/gpu/shader/BindGroup.js</code></li><li><code>node_modules/pixi.js/lib/rendering/renderers/gpu/shader/BindGroup.mjs</code></li></ul><p>Key change:</p><div class="language-diff vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">diff</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#B31D28;--shiki-dark:#FDAEB7;">- resource.off?.(&quot;change&quot;, this.onResourceChange, this)</span></span>
2
+ <span class="line"><span style="--shiki-light:#22863A;--shiki-dark:#85E89D;">+ currentResource.off?.(&quot;change&quot;, this.onResourceChange, this)</span></span></code></pre></div><p>Patch location:</p><ul><li><code>patches/pixi.js+8.16.0.patch</code></li></ul><h2 id="risk-assessment" tabindex="-1">Risk assessment <a class="header-anchor" href="#risk-assessment" aria-label="Permalink to &quot;Risk assessment&quot;">​</a></h2><p>This is a low-intrusion lifecycle fix. It only changes listener cleanup in the resource replacement path. It does not change rendering strategy or public business APIs.</p><h2 id="regression-checklist" tabindex="-1">Regression checklist <a class="header-anchor" href="#regression-checklist" aria-label="Permalink to &quot;Regression checklist&quot;">​</a></h2><p>Run these checks after each Pixi upgrade or patch refresh:</p><ol><li>Raster -&gt; Snapshot Other Map -&gt; Draw roomInfo.</li><li>Structured -&gt; Snapshot Other Map -&gt; Draw roomInfo.</li><li>Repeat snapshot multiple times, then toggle <code>showRoomProperty</code>.</li><li>Run one core flow on both WebGPU and WebGL.</li></ol><h2 id="related-changes" tabindex="-1">Related changes <a class="header-anchor" href="#related-changes" aria-label="Permalink to &quot;Related changes&quot;">​</a></h2><ul><li><code>package.json</code>: upgrade <code>pixi.js</code> to <code>8.16.0</code></li><li><code>yarn.lock</code>: lockfile update</li><li><code>patches/pixi.js+8.16.0.patch</code>: new versioned patch (includes this fix)</li></ul>`,26)])])}const g=o(r,[["render",t]]);export{u as __pageData,g as default};
@@ -0,0 +1 @@
1
+ import{_ as o,c as i,o as s,ag as a}from"./chunks/framework.DRADY2L-.js";const u=JSON.parse('{"title":"2026-02-28 fix: Pixi WebGPU snapshot roomInfo white screen","description":"","frontmatter":{},"headers":[],"relativePath":"records/bugs/2026-02-28-fix-pixi-bindgroup-webgpu-snapshot-whitescreen-bugfix.md","filePath":"records/bugs/2026-02-28-fix-pixi-bindgroup-webgpu-snapshot-whitescreen-bugfix.md","lastUpdated":1772253529000}'),r={name:"records/bugs/2026-02-28-fix-pixi-bindgroup-webgpu-snapshot-whitescreen-bugfix.md"};function t(n,e,c,l,d,h){return s(),i("div",null,[...e[0]||(e[0]=[a("",26)])])}const g=o(r,[["render",t]]);export{u as __pageData,g as default};
@@ -0,0 +1 @@
1
+ import{_ as t,c as o,o as d,ag as r}from"./chunks/framework.DRADY2L-.js";const h=JSON.parse('{"title":"Furniture Feature Implementation Plan","description":"","frontmatter":{},"headers":[],"relativePath":"records/plans/2026-03-02-furniture-feature-plan.md","filePath":"records/plans/2026-03-02-furniture-feature-plan.md","lastUpdated":1772616139000}'),a={name:"records/plans/2026-03-02-furniture-feature-plan.md"};function i(n,e,c,s,l,u){return d(),o("div",null,[...e[0]||(e[0]=[r('<h1 id="furniture-feature-implementation-plan" tabindex="-1">Furniture Feature Implementation Plan <a class="header-anchor" href="#furniture-feature-implementation-plan" aria-label="Permalink to &quot;Furniture Feature Implementation Plan&quot;">​</a></h1><h2 id="background" tabindex="-1">Background <a class="header-anchor" href="#background" aria-label="Permalink to &quot;Background&quot;">​</a></h2><p>Robot vacuum map applications commonly support furniture placement to help users visualize and manage their home layout. This feature allows placing furniture images on the map with full editing capabilities (move, scale, rotate).</p><h2 id="goal-and-scope" tabindex="-1">Goal and Scope <a class="header-anchor" href="#goal-and-scope" aria-label="Permalink to &quot;Goal and Scope&quot;">​</a></h2><p>Implement a furniture placement and editing feature for the robot vacuum map SDK:</p><ul><li>Render furniture as image sprites on the map using a points-based coordinate system (4 corner vertices)</li><li>Support click-to-rotate (90-degree increments), drag-to-move, and handle-to-scale interactions</li><li>Follow the <code>ControlsManager</code> + <code>Zone</code> architecture pattern for manager structure and CRUD logic</li><li>Expose public API methods (<code>drawFurnitures</code>, <code>getFurniturePointsByViewportCenter</code>) and callbacks (<code>onRemoveFurniture</code>, <code>onUpdateFurniture</code>, <code>onClickFurniture</code>)</li></ul><h2 id="chosen-approach" tabindex="-1">Chosen Approach <a class="header-anchor" href="#chosen-approach" aria-label="Permalink to &quot;Chosen Approach&quot;">​</a></h2><ul><li><strong>Parameter Design</strong>: <code>FurnitureParam</code> uses the same 4-point model as <code>ZoneParam</code>, with an additional <code>furnitureType</code> field for asset matching</li><li><strong>Architecture</strong>: <code>FurnitureManager</code> manages CRUD via diff-based updates; <code>Furniture</code> component combines <code>Sprite</code> + <code>EditControlLayer</code> + <code>TapRotateButton</code></li><li><strong>Config</strong>: <code>FurnitureConfig</code> added as a top-level <code>AppConfig</code> property with asset definitions, opacity, and outline styling</li><li><strong>Rotation</strong>: New <code>TapRotateButton</code> component (extending <code>BaseControlButton</code>) provides click-to-rotate-90-degree behavior, replacing the standard drag-rotate control</li><li><strong>Layer</strong>: <code>LAYER_FURNITURE</code> inserted between <code>LAYER_PATH</code> and <code>LAYER_CONTROLS</code> in the rendering order</li></ul><h2 id="impacted-files-modules" tabindex="-1">Impacted Files/Modules <a class="header-anchor" href="#impacted-files-modules" aria-label="Permalink to &quot;Impacted Files/Modules&quot;">​</a></h2><h3 id="new-files" tabindex="-1">New Files <a class="header-anchor" href="#new-files" aria-label="Permalink to &quot;New Files&quot;">​</a></h3><table tabindex="0"><thead><tr><th>File</th><th>Purpose</th></tr></thead><tbody><tr><td><code>src/core/managers/FurnitureManager.ts</code></td><td>Texture loading, CRUD via <code>drawFurnitures</code>, edit-state subscription</td></tr><tr><td><code>src/core/components/Furniture/Furniture.ts</code></td><td>Sprite display + <code>EditControlLayer</code> + <code>TapRotateButton</code></td></tr><tr><td><code>src/core/components/Base/TapRotateButton.ts</code></td><td>Click-to-rotate-90-degrees button</td></tr></tbody></table><h3 id="modified-files" tabindex="-1">Modified Files <a class="header-anchor" href="#modified-files" aria-label="Permalink to &quot;Modified Files&quot;">​</a></h3><table tabindex="0"><thead><tr><th>File</th><th>Changes</th></tr></thead><tbody><tr><td><code>src/core/@types/index.d.ts</code></td><td>Added <code>FurnitureParam</code>, <code>FurnitureAsset</code>, <code>FurnitureConfig</code> types; <code>furniture</code> to <code>AppConfig</code>; <code>editingFurnitureIds</code> to <code>RuntimeConfig</code></td></tr><tr><td><code>src/core/@types/callbacks.ts</code></td><td>Added <code>onRemoveFurniture</code>, <code>onUpdateFurniture</code>, <code>onClickFurniture</code></td></tr><tr><td><code>src/core/@types/methods.ts</code></td><td>Added <code>drawFurnitures</code>, <code>getFurniturePointsByViewportCenter</code>; <code>furnitures</code> to <code>snapshotByData</code> data param</td></tr><tr><td><code>src/core/constant/methods.ts</code></td><td>Added method/callback names for RJS bundle exposure</td></tr><tr><td><code>src/core/constant/config.ts</code></td><td>Added furniture defaults to <code>DEFAULT_CONFIG</code> and <code>DEFAULT_RUNTIME_CONFIG</code></td></tr><tr><td><code>src/core/application/AppContainer.ts</code></td><td>Added <code>LAYER_FURNITURE</code> constant and layer ordering</td></tr><tr><td><code>src/core/application/MapApplication.ts</code></td><td>Registered <code>FurnitureManager</code>, exposed public API, wired asset preloading/snapshot/origin</td></tr><tr><td><code>src/core/application/AppService.ts</code></td><td>Added <code>furnitureManager</code> and <code>furnitureConfig</code> accessors</td></tr><tr><td><code>src/core/index.docs.ts</code></td><td>Exported <code>FurnitureParam</code> type</td></tr><tr><td><code>src/app/debugTools/index.ts</code></td><td>Added &quot;Test Furniture&quot; button for development verification</td></tr></tbody></table><h2 id="verification-checklist" tabindex="-1">Verification Checklist <a class="header-anchor" href="#verification-checklist" aria-label="Permalink to &quot;Verification Checklist&quot;">​</a></h2><ul><li>[x] <code>FurnitureParam</code>, <code>FurnitureAsset</code>, <code>FurnitureConfig</code> types defined</li><li>[x] Callbacks (<code>onRemoveFurniture</code>, <code>onUpdateFurniture</code>, <code>onClickFurniture</code>) registered</li><li>[x] Public API methods (<code>drawFurnitures</code>, <code>getFurniturePointsByViewportCenter</code>) exposed</li><li>[x] Default config values provided with <code>doubleBed.png</code> asset</li><li>[x] <code>LAYER_FURNITURE</code> added between <code>LAYER_PATH</code> and <code>LAYER_CONTROLS</code></li><li>[x] <code>TapRotateButton</code> component created</li><li>[x] <code>Furniture</code> component renders sprite from points with editing controls</li><li>[x] <code>FurnitureManager</code> handles CRUD, edit-state, and layer positioning</li><li>[x] Integration in <code>MapApplication</code> (managers, assets, snapshot, origin, destroy)</li><li>[x] Demo app test button functional</li><li>[x] <code>npm run lint</code> passes</li><li>[x] <code>npx tsc --noEmit</code> passes</li></ul>',15)])])}const m=t(a,[["render",i]]);export{h as __pageData,m as default};
@@ -0,0 +1 @@
1
+ import{_ as t,c as o,o as d,ag as r}from"./chunks/framework.DRADY2L-.js";const h=JSON.parse('{"title":"Furniture Feature Implementation Plan","description":"","frontmatter":{},"headers":[],"relativePath":"records/plans/2026-03-02-furniture-feature-plan.md","filePath":"records/plans/2026-03-02-furniture-feature-plan.md","lastUpdated":1772616139000}'),a={name:"records/plans/2026-03-02-furniture-feature-plan.md"};function i(n,e,c,s,l,u){return d(),o("div",null,[...e[0]||(e[0]=[r("",15)])])}const m=t(a,[["render",i]]);export{h as __pageData,m as default};
@@ -1,4 +1,4 @@
1
- import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.DRADY2L-.js";const c=JSON.parse('{"title":"地图事件回调","description":"","frontmatter":{},"headers":[],"relativePath":"reference/callbacks.md","filePath":"reference/callbacks.md","lastUpdated":1769688164000}'),n={name:"reference/callbacks.md"};function p(l,s,h,o,k,d){return t(),a("div",null,[...s[0]||(s[0]=[e(`<h1 id="地图事件回调" tabindex="-1">地图事件回调 <a class="header-anchor" href="#地图事件回调" aria-label="Permalink to &quot;地图事件回调&quot;">​</a></h1><p>了解 RobotMap 的地图事件回调,用于响应地图的各种交互和状态变化。</p><h2 id="使用示例" tabindex="-1">使用示例 <a class="header-anchor" href="#使用示例" aria-label="Permalink to &quot;使用示例&quot;">​</a></h2><p>地图事件回调通过组件 props 传递,当地图发生相应的交互或状态变化时会自动触发。所有回调都是可选的,只需要传入你关心的回调函数。</p><div class="language-tsx vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">tsx</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> React </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;react&#39;</span></span>
1
+ import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.DRADY2L-.js";const c=JSON.parse('{"title":"地图事件回调","description":"","frontmatter":{},"headers":[],"relativePath":"reference/callbacks.md","filePath":"reference/callbacks.md","lastUpdated":1772617250000}'),n={name:"reference/callbacks.md"};function p(l,s,h,o,k,d){return t(),a("div",null,[...s[0]||(s[0]=[e(`<h1 id="地图事件回调" tabindex="-1">地图事件回调 <a class="header-anchor" href="#地图事件回调" aria-label="Permalink to &quot;地图事件回调&quot;">​</a></h1><p>了解 RobotMap 的地图事件回调,用于响应地图的各种交互和状态变化。</p><h2 id="使用示例" tabindex="-1">使用示例 <a class="header-anchor" href="#使用示例" aria-label="Permalink to &quot;使用示例&quot;">​</a></h2><p>地图事件回调通过组件 props 传递,当地图发生相应的交互或状态变化时会自动触发。所有回调都是可选的,只需要传入你关心的回调函数。</p><div class="language-tsx vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">tsx</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> React </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;react&#39;</span></span>
2
2
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">import</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> { RobotMap } </span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">from</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> &#39;@ray-js/robot-map&#39;</span></span>
3
3
  <span class="line"></span>
4
4
  <span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MapPage</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">() {</span></span>
@@ -16,4 +16,4 @@ import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.DRADY2L-.js";const c
16
16
  <span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"> // ... 其他属性</span></span>
17
17
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> /&gt;</span></span>
18
18
  <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;"> )</span></span>
19
- <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="onmapfirstdrawed" tabindex="-1">onMapFirstDrawed <a class="header-anchor" href="#onmapfirstdrawed" aria-label="Permalink to &quot;onMapFirstDrawed&quot;">​</a></h2><p>地图首次绘制完成回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onMapFirstDrawed</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">mapState</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MapState</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>mapState</code>: <a href="/reference/types.html#mapstate"><code>MapState</code></a> - 地图状态信息,包含地图尺寸、原点、充电桩等信息。</li></ul><p><strong>返回值</strong>: <code>void</code></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>只有首次绘制完成后,才会触发此回调。你可以利用它来移除 Loading 状态。</p></div><h2 id="onmapdrawed" tabindex="-1">onMapDrawed <a class="header-anchor" href="#onmapdrawed" aria-label="Permalink to &quot;onMapDrawed&quot;">​</a></h2><p>地图绘制完成回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onMapDrawed</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">mapState</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MapState</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>mapState</code>: <a href="/reference/types.html#mapstate"><code>MapState</code></a> - 地图状态信息,包含地图尺寸、原点、充电桩等信息。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onpathdrawed" tabindex="-1">onPathDrawed <a class="header-anchor" href="#onpathdrawed" aria-label="Permalink to &quot;onPathDrawed&quot;">​</a></h2><p>路径绘制完成回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onPathDrawed</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">pathState</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> PathState</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>pathState</code>: <a href="/reference/types.html#pathstate"><code>PathState</code></a> - 路径状态信息,包含路径ID、类型、机器人位置等。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onroompropertiesdrawed" tabindex="-1">onRoomPropertiesDrawed <a class="header-anchor" href="#onroompropertiesdrawed" aria-label="Permalink to &quot;onRoomPropertiesDrawed&quot;">​</a></h2><p>房间信息绘制完成回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onRoomPropertiesDrawed</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">rooms</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> RoomProperty</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[])</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>rooms</code>: <a href="/reference/types.html#roomproperty"><code>RoomProperty[]</code></a> - 房间属性信息数组。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickroom" tabindex="-1">onClickRoom <a class="header-anchor" href="#onclickroom" aria-label="Permalink to &quot;onClickRoom&quot;">​</a></h2><p>点击房间回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickRoom</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">room</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Partial</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">RoomData</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>room</code>: <a href="/reference/types.html#roomdata"><code>RoomData</code></a> - 被点击的房间信息。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickroomproperties" tabindex="-1">onClickRoomProperties <a class="header-anchor" href="#onclickroomproperties" aria-label="Permalink to &quot;onClickRoomProperties&quot;">​</a></h2><p>点击房间信息回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickRoomProperties</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">room</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> RoomData</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>room</code>: <a href="/reference/types.html#roomdata"><code>RoomData</code></a> - 被点击的房间信息。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onremoveforbiddensweepzone" tabindex="-1">onRemoveForbiddenSweepZone <a class="header-anchor" href="#onremoveforbiddensweepzone" aria-label="Permalink to &quot;onRemoveForbiddenSweepZone&quot;">​</a></h2><p>点击禁扫区域删除按钮的回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onRemoveForbiddenSweepZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>id</code>: <code>string</code> - 操作对应的禁扫区域ID。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onremoveforbiddenmopzone" tabindex="-1">onRemoveForbiddenMopZone <a class="header-anchor" href="#onremoveforbiddenmopzone" aria-label="Permalink to &quot;onRemoveForbiddenMopZone&quot;">​</a></h2><p>点击禁拖区域删除按钮的回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onRemoveForbiddenMopZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>id</code>: <code>string</code> - 操作对应的禁拖区域ID。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onremovecleanzone" tabindex="-1">onRemoveCleanZone <a class="header-anchor" href="#onremovecleanzone" aria-label="Permalink to &quot;onRemoveCleanZone&quot;">​</a></h2><p>点击清扫区域删除按钮的回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onRemoveCleanZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>id</code>: <code>string</code> - 操作对应的清扫区域ID。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onremovevirtualwall" tabindex="-1">onRemoveVirtualWall <a class="header-anchor" href="#onremovevirtualwall" aria-label="Permalink to &quot;onRemoveVirtualWall&quot;">​</a></h2><p>点击虚拟墙删除按钮的回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onRemoveVirtualWall</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>id</code>: <code>string</code> - 操作对应的虚拟墙ID。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onupdateforbiddensweepzone" tabindex="-1">onUpdateForbiddenSweepZone <a class="header-anchor" href="#onupdateforbiddensweepzone" aria-label="Permalink to &quot;onUpdateForbiddenSweepZone&quot;">​</a></h2><p>更新禁扫区域回调。当用户操作禁扫区域(如拖拽、缩放)后触发。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateForbiddenSweepZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">zone</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>zone</code>: <a href="/reference/types.html#zoneparam"><code>ZoneParam</code></a> - 更新后的禁扫区域数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onupdateforbiddenmopzone" tabindex="-1">onUpdateForbiddenMopZone <a class="header-anchor" href="#onupdateforbiddenmopzone" aria-label="Permalink to &quot;onUpdateForbiddenMopZone&quot;">​</a></h2><p>更新禁拖区域回调。当用户操作禁拖区域(如拖拽、缩放)后触发。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateForbiddenMopZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">zone</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>zone</code>: <a href="/reference/types.html#zoneparam"><code>ZoneParam</code></a> - 更新后的禁拖区域数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onupdatecleanzone" tabindex="-1">onUpdateCleanZone <a class="header-anchor" href="#onupdatecleanzone" aria-label="Permalink to &quot;onUpdateCleanZone&quot;">​</a></h2><p>更新清扫区域回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateCleanZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">zone</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>zone</code>: <a href="/reference/types.html#zoneparam"><code>ZoneParam</code></a> - 更新后的清扫区域数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onupdatevirtualwall" tabindex="-1">onUpdateVirtualWall <a class="header-anchor" href="#onupdatevirtualwall" aria-label="Permalink to &quot;onUpdateVirtualWall&quot;">​</a></h2><p>更新虚拟墙回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateVirtualWall</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">wall</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> VirtualWallParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>wall</code>: <a href="/reference/types.html#virtualwallparam"><code>VirtualWallParam</code></a> - 更新后的虚拟墙数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onupdatespot" tabindex="-1">onUpdateSpot <a class="header-anchor" href="#onupdatespot" aria-label="Permalink to &quot;onUpdateSpot&quot;">​</a></h2><p>更新定点清扫回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateSpot</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">spot</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> SpotParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>spot</code>: <a href="/reference/types.html#spotparam"><code>SpotParam</code></a> - 更新后的定点清扫数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickforbiddensweepzone" tabindex="-1">onClickForbiddenSweepZone <a class="header-anchor" href="#onclickforbiddensweepzone" aria-label="Permalink to &quot;onClickForbiddenSweepZone&quot;">​</a></h2><p>点击禁扫区域回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickForbiddenSweepZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">zone</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>zone</code>: <a href="/reference/types.html#zoneparam"><code>ZoneParam</code></a> - 被点击的禁扫区域数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickforbiddenmopzone" tabindex="-1">onClickForbiddenMopZone <a class="header-anchor" href="#onclickforbiddenmopzone" aria-label="Permalink to &quot;onClickForbiddenMopZone&quot;">​</a></h2><p>点击禁拖区域回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickForbiddenMopZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">zone</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>zone</code>: <a href="/reference/types.html#zoneparam"><code>ZoneParam</code></a> - 被点击的禁拖区域数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickcleanzone" tabindex="-1">onClickCleanZone <a class="header-anchor" href="#onclickcleanzone" aria-label="Permalink to &quot;onClickCleanZone&quot;">​</a></h2><p>点击清扫区域回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickCleanZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">zone</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>zone</code>: <a href="/reference/types.html#zoneparam"><code>ZoneParam</code></a> - 被点击的清扫区域数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickvirtualwall" tabindex="-1">onClickVirtualWall <a class="header-anchor" href="#onclickvirtualwall" aria-label="Permalink to &quot;onClickVirtualWall&quot;">​</a></h2><p>点击虚拟墙回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickVirtualWall</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">wall</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> VirtualWallParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>wall</code>: <a href="/reference/types.html#virtualwallparam"><code>VirtualWallParam</code></a> - 被点击的虚拟墙数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickspot" tabindex="-1">onClickSpot <a class="header-anchor" href="#onclickspot" aria-label="Permalink to &quot;onClickSpot&quot;">​</a></h2><p>点击定点清扫回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickSpot</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">spot</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> SpotParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>spot</code>: <a href="/reference/types.html#spotparam"><code>SpotParam</code></a> - 被点击的定点清扫数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickdetectedobject" tabindex="-1">onClickDetectedObject <a class="header-anchor" href="#onclickdetectedobject" aria-label="Permalink to &quot;onClickDetectedObject&quot;">​</a></h2><p>点击检测物体回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickDetectedObject</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">object</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> DetectedObjectParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>object</code>: <a href="/reference/types.html#detectedobjectparam"><code>DetectedObjectParam</code></a> - 被点击的检测物体数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickcustomelement" tabindex="-1">onClickCustomElement <a class="header-anchor" href="#onclickcustomelement" aria-label="Permalink to &quot;onClickCustomElement&quot;">​</a></h2><p>点击自定义元素回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickCustomElement</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">element</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> CustomElementParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>element</code>: <a href="/reference/types.html#customelementparam"><code>CustomElementParam</code></a> - 被点击的自定义元素数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onupdatedivider" tabindex="-1">onUpdateDivider <a class="header-anchor" href="#onupdatedivider" aria-label="Permalink to &quot;onUpdateDivider&quot;">​</a></h2><p>更新分割线回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateDivider</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">divider</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[])</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>divider</code>: <a href="/reference/types.html#point"><code>Point[]</code></a> - 更新后的分割线数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickmap" tabindex="-1">onClickMap <a class="header-anchor" href="#onclickmap" aria-label="Permalink to &quot;onClickMap&quot;">​</a></h2><p>地图点击回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickMap</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">point</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>point</code>: <a href="/reference/types.html#point"><code>Point</code></a> - 点击位置的地图坐标。</li></ul><p><strong>返回值</strong>: <code>void</code></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>只有启用 <code>runtime.enableMapClickCapture</code> 后,才会触发此回调。</p></div><h2 id="ongesturestart" tabindex="-1">onGestureStart <a class="header-anchor" href="#ongesturestart" aria-label="Permalink to &quot;onGestureStart&quot;">​</a></h2><p>手势交互开始回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onGestureStart</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>返回值</strong>: <code>void</code></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>当用户开始与地图进行交互(如平移、缩放)或操作地图上的控制元素(如禁区、虚拟墙等)时触发。该回调通常用于在小程序层动态切换组件显隐(如将 <code>CoverView</code> 切换为普通 <code>View</code>),以避免原生组件由于层级问题干扰手势捕获。</p></div><h2 id="ongestureend" tabindex="-1">onGestureEnd <a class="header-anchor" href="#ongestureend" aria-label="Permalink to &quot;onGestureEnd&quot;">​</a></h2><p>手势交互结束回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onGestureEnd</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>返回值</strong>: <code>void</code></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>当用户结束与地图上的控制元素的手势交互时触发。</p></div><h2 id="onclickrobot" tabindex="-1">onClickRobot <a class="header-anchor" href="#onclickrobot" aria-label="Permalink to &quot;onClickRobot&quot;">​</a></h2><p>点击扫地机器人回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickRobot</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">point</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> IconPoint</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>point</code>: <a href="/reference/types.html#iconpoint"><code>IconPoint</code></a> - 扫地机器人当前位置和朝向。</li></ul><p><strong>返回值</strong>: <code>void</code></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>只有启用 <code>config.interaction.enableRobotClick</code> 后,该回调才会被触发。</p></div><h2 id="onclickchargingstation" tabindex="-1">onClickChargingStation <a class="header-anchor" href="#onclickchargingstation" aria-label="Permalink to &quot;onClickChargingStation&quot;">​</a></h2><p>点击充电桩回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickChargingStation</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">point</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> IconPoint</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>point</code>: <a href="/reference/types.html#iconpoint"><code>IconPoint</code></a> - 充电桩当前位置和朝向。</li></ul><p><strong>返回值</strong>: <code>void</code></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>只有启用 <code>config.interaction.enableChargingStationClick</code> 后,该回调才会被触发。</p></div>`,203)])])}const g=i(n,[["render",p]]);export{c as __pageData,g as default};
19
+ <span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">}</span></span></code></pre></div><h2 id="onmapfirstdrawed" tabindex="-1">onMapFirstDrawed <a class="header-anchor" href="#onmapfirstdrawed" aria-label="Permalink to &quot;onMapFirstDrawed&quot;">​</a></h2><p>地图首次绘制完成回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onMapFirstDrawed</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">mapState</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MapState</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>mapState</code>: <a href="/reference/types.html#mapstate"><code>MapState</code></a> - 地图状态信息,包含地图尺寸、原点、充电桩等信息。</li></ul><p><strong>返回值</strong>: <code>void</code></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>只有首次绘制完成后,才会触发此回调。你可以利用它来移除 Loading 状态。</p></div><h2 id="onmapdrawed" tabindex="-1">onMapDrawed <a class="header-anchor" href="#onmapdrawed" aria-label="Permalink to &quot;onMapDrawed&quot;">​</a></h2><p>地图绘制完成回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onMapDrawed</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">mapState</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> MapState</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>mapState</code>: <a href="/reference/types.html#mapstate"><code>MapState</code></a> - 地图状态信息,包含地图尺寸、原点、充电桩等信息。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onpathdrawed" tabindex="-1">onPathDrawed <a class="header-anchor" href="#onpathdrawed" aria-label="Permalink to &quot;onPathDrawed&quot;">​</a></h2><p>路径绘制完成回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onPathDrawed</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">pathState</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> PathState</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>pathState</code>: <a href="/reference/types.html#pathstate"><code>PathState</code></a> - 路径状态信息,包含路径ID、类型、机器人位置等。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onroompropertiesdrawed" tabindex="-1">onRoomPropertiesDrawed <a class="header-anchor" href="#onroompropertiesdrawed" aria-label="Permalink to &quot;onRoomPropertiesDrawed&quot;">​</a></h2><p>房间信息绘制完成回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onRoomPropertiesDrawed</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">rooms</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> RoomProperty</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[])</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>rooms</code>: <a href="/reference/types.html#roomproperty"><code>RoomProperty[]</code></a> - 房间属性信息数组。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickroom" tabindex="-1">onClickRoom <a class="header-anchor" href="#onclickroom" aria-label="Permalink to &quot;onClickRoom&quot;">​</a></h2><p>点击房间回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickRoom</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">room</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Partial</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&lt;</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">RoomData</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">&gt;)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>room</code>: <a href="/reference/types.html#roomdata"><code>RoomData</code></a> - 被点击的房间信息。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickroomproperties" tabindex="-1">onClickRoomProperties <a class="header-anchor" href="#onclickroomproperties" aria-label="Permalink to &quot;onClickRoomProperties&quot;">​</a></h2><p>点击房间信息回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickRoomProperties</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">room</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> RoomData</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>room</code>: <a href="/reference/types.html#roomdata"><code>RoomData</code></a> - 被点击的房间信息。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onremoveforbiddensweepzone" tabindex="-1">onRemoveForbiddenSweepZone <a class="header-anchor" href="#onremoveforbiddensweepzone" aria-label="Permalink to &quot;onRemoveForbiddenSweepZone&quot;">​</a></h2><p>点击禁扫区域删除按钮的回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onRemoveForbiddenSweepZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>id</code>: <code>string</code> - 操作对应的禁扫区域ID。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onremoveforbiddenmopzone" tabindex="-1">onRemoveForbiddenMopZone <a class="header-anchor" href="#onremoveforbiddenmopzone" aria-label="Permalink to &quot;onRemoveForbiddenMopZone&quot;">​</a></h2><p>点击禁拖区域删除按钮的回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onRemoveForbiddenMopZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>id</code>: <code>string</code> - 操作对应的禁拖区域ID。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onremovecleanzone" tabindex="-1">onRemoveCleanZone <a class="header-anchor" href="#onremovecleanzone" aria-label="Permalink to &quot;onRemoveCleanZone&quot;">​</a></h2><p>点击清扫区域删除按钮的回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onRemoveCleanZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>id</code>: <code>string</code> - 操作对应的清扫区域ID。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onremovevirtualwall" tabindex="-1">onRemoveVirtualWall <a class="header-anchor" href="#onremovevirtualwall" aria-label="Permalink to &quot;onRemoveVirtualWall&quot;">​</a></h2><p>点击虚拟墙删除按钮的回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onRemoveVirtualWall</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>id</code>: <code>string</code> - 操作对应的虚拟墙ID。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onupdateforbiddensweepzone" tabindex="-1">onUpdateForbiddenSweepZone <a class="header-anchor" href="#onupdateforbiddensweepzone" aria-label="Permalink to &quot;onUpdateForbiddenSweepZone&quot;">​</a></h2><p>更新禁扫区域回调。当用户操作禁扫区域(如拖拽、缩放)后触发。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateForbiddenSweepZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">zone</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>zone</code>: <a href="/reference/types.html#zoneparam"><code>ZoneParam</code></a> - 更新后的禁扫区域数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onupdateforbiddenmopzone" tabindex="-1">onUpdateForbiddenMopZone <a class="header-anchor" href="#onupdateforbiddenmopzone" aria-label="Permalink to &quot;onUpdateForbiddenMopZone&quot;">​</a></h2><p>更新禁拖区域回调。当用户操作禁拖区域(如拖拽、缩放)后触发。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateForbiddenMopZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">zone</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>zone</code>: <a href="/reference/types.html#zoneparam"><code>ZoneParam</code></a> - 更新后的禁拖区域数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onupdatecleanzone" tabindex="-1">onUpdateCleanZone <a class="header-anchor" href="#onupdatecleanzone" aria-label="Permalink to &quot;onUpdateCleanZone&quot;">​</a></h2><p>更新清扫区域回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateCleanZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">zone</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>zone</code>: <a href="/reference/types.html#zoneparam"><code>ZoneParam</code></a> - 更新后的清扫区域数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onupdatevirtualwall" tabindex="-1">onUpdateVirtualWall <a class="header-anchor" href="#onupdatevirtualwall" aria-label="Permalink to &quot;onUpdateVirtualWall&quot;">​</a></h2><p>更新虚拟墙回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateVirtualWall</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">wall</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> VirtualWallParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>wall</code>: <a href="/reference/types.html#virtualwallparam"><code>VirtualWallParam</code></a> - 更新后的虚拟墙数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onupdatespot" tabindex="-1">onUpdateSpot <a class="header-anchor" href="#onupdatespot" aria-label="Permalink to &quot;onUpdateSpot&quot;">​</a></h2><p>更新定点清扫回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateSpot</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">spot</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> SpotParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>spot</code>: <a href="/reference/types.html#spotparam"><code>SpotParam</code></a> - 更新后的定点清扫数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickforbiddensweepzone" tabindex="-1">onClickForbiddenSweepZone <a class="header-anchor" href="#onclickforbiddensweepzone" aria-label="Permalink to &quot;onClickForbiddenSweepZone&quot;">​</a></h2><p>点击禁扫区域回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickForbiddenSweepZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">zone</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>zone</code>: <a href="/reference/types.html#zoneparam"><code>ZoneParam</code></a> - 被点击的禁扫区域数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickforbiddenmopzone" tabindex="-1">onClickForbiddenMopZone <a class="header-anchor" href="#onclickforbiddenmopzone" aria-label="Permalink to &quot;onClickForbiddenMopZone&quot;">​</a></h2><p>点击禁拖区域回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickForbiddenMopZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">zone</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>zone</code>: <a href="/reference/types.html#zoneparam"><code>ZoneParam</code></a> - 被点击的禁拖区域数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickcleanzone" tabindex="-1">onClickCleanZone <a class="header-anchor" href="#onclickcleanzone" aria-label="Permalink to &quot;onClickCleanZone&quot;">​</a></h2><p>点击清扫区域回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickCleanZone</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">zone</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> ZoneParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>zone</code>: <a href="/reference/types.html#zoneparam"><code>ZoneParam</code></a> - 被点击的清扫区域数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickvirtualwall" tabindex="-1">onClickVirtualWall <a class="header-anchor" href="#onclickvirtualwall" aria-label="Permalink to &quot;onClickVirtualWall&quot;">​</a></h2><p>点击虚拟墙回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickVirtualWall</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">wall</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> VirtualWallParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>wall</code>: <a href="/reference/types.html#virtualwallparam"><code>VirtualWallParam</code></a> - 被点击的虚拟墙数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickspot" tabindex="-1">onClickSpot <a class="header-anchor" href="#onclickspot" aria-label="Permalink to &quot;onClickSpot&quot;">​</a></h2><p>点击定点清扫回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickSpot</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">spot</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> SpotParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>spot</code>: <a href="/reference/types.html#spotparam"><code>SpotParam</code></a> - 被点击的定点清扫数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onremovefurniture" tabindex="-1">onRemoveFurniture <a class="header-anchor" href="#onremovefurniture" aria-label="Permalink to &quot;onRemoveFurniture&quot;">​</a></h2><p>点击家具删除按钮的回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onRemoveFurniture</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">id</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> string</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>id</code>: <code>string</code> - 被删除的家具ID。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onupdatefurniture" tabindex="-1">onUpdateFurniture <a class="header-anchor" href="#onupdatefurniture" aria-label="Permalink to &quot;onUpdateFurniture&quot;">​</a></h2><p>更新家具回调。当用户操作家具(拖拽、缩放、旋转)后触发。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateFurniture</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">furniture</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> FurnitureParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>furniture</code>: <a href="/reference/types.html#furnitureparam"><code>FurnitureParam</code></a> - 更新后的家具数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickfurniture" tabindex="-1">onClickFurniture <a class="header-anchor" href="#onclickfurniture" aria-label="Permalink to &quot;onClickFurniture&quot;">​</a></h2><p>点击家具回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickFurniture</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">furniture</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> FurnitureParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>furniture</code>: <a href="/reference/types.html#furnitureparam"><code>FurnitureParam</code></a> - 被点击的家具数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickdetectedobject" tabindex="-1">onClickDetectedObject <a class="header-anchor" href="#onclickdetectedobject" aria-label="Permalink to &quot;onClickDetectedObject&quot;">​</a></h2><p>点击检测物体回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickDetectedObject</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">object</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> DetectedObjectParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>object</code>: <a href="/reference/types.html#detectedobjectparam"><code>DetectedObjectParam</code></a> - 被点击的检测物体数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickcustomelement" tabindex="-1">onClickCustomElement <a class="header-anchor" href="#onclickcustomelement" aria-label="Permalink to &quot;onClickCustomElement&quot;">​</a></h2><p>点击自定义元素回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickCustomElement</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">element</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> CustomElementParam</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>element</code>: <a href="/reference/types.html#customelementparam"><code>CustomElementParam</code></a> - 被点击的自定义元素数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onupdatedivider" tabindex="-1">onUpdateDivider <a class="header-anchor" href="#onupdatedivider" aria-label="Permalink to &quot;onUpdateDivider&quot;">​</a></h2><p>更新分割线回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onUpdateDivider</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">divider</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">[])</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>divider</code>: <a href="/reference/types.html#point"><code>Point[]</code></a> - 更新后的分割线数据。</li></ul><p><strong>返回值</strong>: <code>void</code></p><h2 id="onclickmap" tabindex="-1">onClickMap <a class="header-anchor" href="#onclickmap" aria-label="Permalink to &quot;onClickMap&quot;">​</a></h2><p>地图点击回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickMap</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">point</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> Point</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>point</code>: <a href="/reference/types.html#point"><code>Point</code></a> - 点击位置的地图坐标。</li></ul><p><strong>返回值</strong>: <code>void</code></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>只有启用 <code>runtime.enableMapClickCapture</code> 后,才会触发此回调。</p></div><h2 id="ongesturestart" tabindex="-1">onGestureStart <a class="header-anchor" href="#ongesturestart" aria-label="Permalink to &quot;onGestureStart&quot;">​</a></h2><p>手势交互开始回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onGestureStart</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>返回值</strong>: <code>void</code></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>当用户开始与地图进行交互(如平移、缩放)或操作地图上的控制元素(如禁区、虚拟墙等)时触发。该回调通常用于在小程序层动态切换组件显隐(如将 <code>CoverView</code> 切换为普通 <code>View</code>),以避免原生组件由于层级问题干扰手势捕获。</p></div><h2 id="ongestureend" tabindex="-1">onGestureEnd <a class="header-anchor" href="#ongestureend" aria-label="Permalink to &quot;onGestureEnd&quot;">​</a></h2><p>手势交互结束回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onGestureEnd</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">()</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>返回值</strong>: <code>void</code></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>当用户结束与地图上的控制元素的手势交互时触发。</p></div><h2 id="onclickrobot" tabindex="-1">onClickRobot <a class="header-anchor" href="#onclickrobot" aria-label="Permalink to &quot;onClickRobot&quot;">​</a></h2><p>点击扫地机器人回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickRobot</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">point</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> IconPoint</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>point</code>: <a href="/reference/types.html#iconpoint"><code>IconPoint</code></a> - 扫地机器人当前位置和朝向。</li></ul><p><strong>返回值</strong>: <code>void</code></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>只有启用 <code>config.interaction.enableRobotClick</code> 后,该回调才会被触发。</p></div><h2 id="onclickchargingstation" tabindex="-1">onClickChargingStation <a class="header-anchor" href="#onclickchargingstation" aria-label="Permalink to &quot;onClickChargingStation&quot;">​</a></h2><p>点击充电桩回调。</p><p><strong>类型</strong>:</p><div class="language-ts vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">ts</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">function</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> onClickChargingStation</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">(</span><span style="--shiki-light:#E36209;--shiki-dark:#FFAB70;">point</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> IconPoint</span><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">)</span><span style="--shiki-light:#D73A49;--shiki-dark:#F97583;">:</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> void</span></span></code></pre></div><p><strong>参数</strong>:</p><ul><li><code>point</code>: <a href="/reference/types.html#iconpoint"><code>IconPoint</code></a> - 充电桩当前位置和朝向。</li></ul><p><strong>返回值</strong>: <code>void</code></p><div class="tip custom-block"><p class="custom-block-title">TIP</p><p>只有启用 <code>config.interaction.enableChargingStationClick</code> 后,该回调才会被触发。</p></div>`,224)])])}const g=i(n,[["render",p]]);export{c as __pageData,g as default};
@@ -1 +1 @@
1
- import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.DRADY2L-.js";const c=JSON.parse('{"title":"地图事件回调","description":"","frontmatter":{},"headers":[],"relativePath":"reference/callbacks.md","filePath":"reference/callbacks.md","lastUpdated":1769688164000}'),n={name:"reference/callbacks.md"};function p(l,s,h,o,k,d){return t(),a("div",null,[...s[0]||(s[0]=[e("",203)])])}const g=i(n,[["render",p]]);export{c as __pageData,g as default};
1
+ import{_ as i,c as a,o as t,ag as e}from"./chunks/framework.DRADY2L-.js";const c=JSON.parse('{"title":"地图事件回调","description":"","frontmatter":{},"headers":[],"relativePath":"reference/callbacks.md","filePath":"reference/callbacks.md","lastUpdated":1772617250000}'),n={name:"reference/callbacks.md"};function p(l,s,h,o,k,d){return t(),a("div",null,[...s[0]||(s[0]=[e("",224)])])}const g=i(n,[["render",p]]);export{c as __pageData,g as default};