-
SelectionChangeEventInfo
Object
當用戶使用
Shift+Left-click
選擇或取消選擇圖形時,此信息作為更新事件的toolEventInfo
參數返回。-
類型 說明 type String類型始終為
selection-change
。值永遠是"selection-change".
graphics 的數組,表示選擇的最新圖形。
graphics 數組,表示取消選擇的最新圖形。
屬性:
例子:
// listen to update event sketch.on("update", function(event) { const eventInfo = event.toolEventInfo; // check if a graphic is being selected or deselected. if (eventInfo && eventInfo.type === "selection-change") { if(eventInfo.added.length > 0) { // graphic is being added to the currently selected graphics. console.log("geometry type added: ", eventInfo.added[0].geometry.type); } else { // graphic is being removed from the currently selected graphics. console.log("geometry type removed: ", eventInfo.removed[0].geometry.type); } } });
-
基本信息
以下是所在類或對象的基本信息。
AMD:
require(["esri/widgets/Sketch"], (Sketch) => { /* code goes here */ });
ESM:
import Sketch from "@arcgis/core/widgets/Sketch";
類:
esri/widgets/Sketch
繼承: Sketch > Widget > Accessor
自從:用於 JavaScript 4.10 的 ArcGIS API
用法說明
Sketch.SelectionChangeEventInfo
函數(或屬性)的定義如下:
相關用法
- JavaScript ArcGIS Sketch.classes用法及代碼示例
- JavaScript ArcGIS Sketch.visible用法及代碼示例
- JavaScript ArcGIS Sketch.create用法及代碼示例
- JavaScript ArcGIS Sketch.VisibleElements用法及代碼示例
- JavaScript ArcGIS Sketch.update用法及代碼示例
- JavaScript ArcGIS Sketch.RotateEventInfo用法及代碼示例
- JavaScript ArcGIS Sketch.MoveEventInfo用法及代碼示例
- JavaScript ArcGIS Sketch.VertexAddEventInfo用法及代碼示例
- JavaScript ArcGIS Sketch.visibleElements用法及代碼示例
- JavaScript ArcGIS Sketch.CursorUpdateEventInfo用法及代碼示例
- JavaScript ArcGIS Sketch.ReshapeEventInfo用法及代碼示例
- JavaScript ArcGIS Sketch.VertexRemoveEventInfo用法及代碼示例
- JavaScript ArcGIS Sketch.when用法及代碼示例
- JavaScript ArcGIS Sketch.on用法及代碼示例
- JavaScript ArcGIS Sketch.container用法及代碼示例
- JavaScript ArcGIS Sketch create事件用法及代碼示例
- JavaScript ArcGIS Sketch用法及代碼示例
- JavaScript ArcGIS SketchEdges3D用法及代碼示例
- JavaScript ArcGIS Sketch delete事件用法及代碼示例
- JavaScript ArcGIS Sketch update事件用法及代碼示例
- JavaScript ArcGIS SceneView double-click事件用法及代碼示例
- JavaScript ArcGIS Sublayer.JoinTableDataSource用法及代碼示例
- JavaScript ArcGIS Slider.effectiveMin用法及代碼示例
- JavaScript ArcGIS Swipe.when用法及代碼示例
- JavaScript ArcGIS Slider.container用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 Sketch.SelectionChangeEventInfo。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。