-
PausableWatchHandle
Object
表示當對象調用 watch() 時創建的 watch 。
例子:
let handle = watchUtils.pausable(map, 'basemap', function(newVal){ // Each time the value of `map.basemap` changes, it is logged in the console console.log("new basemap: ", newVal); }); // When pause() is called on the watch handle, the callback represented by the // watch is no longer invoked, but is still available for later use handle.pause(); // When resume() is called on the watch handle, the callback resumes // firing each time the watched property changes. handle.resume(); // When remove() is called on the watch handle, the map no longer watches for changes to basemap handle.remove();
基本信息
以下是所在類或對象的基本信息。
AMD:
require(["esri/core/watchUtils"], (watchUtils) => { /* code goes here */ });
ESM:
import * as watchUtils from "@arcgis/core/core/watchUtils";
對象:
esri/core/watchUtils
自從:用於 JavaScript 4.0 的 ArcGIS API
用法說明
watchUtils.PausableWatchHandle
函數(或屬性)的定義如下:
相關用法
- JavaScript ArcGIS watchUtils.PromisedWatchHandle用法及代碼示例
- JavaScript ArcGIS watchUtils.whenEqualOnce用法及代碼示例
- JavaScript ArcGIS watchUtils.whenEqual用法及代碼示例
- JavaScript ArcGIS wfsUtils.getCapabilities用法及代碼示例
- JavaScript ArcGIS workers.open用法及代碼示例
- JavaScript window.open()用法及代碼示例
- JavaScript ArcGIS wfsUtils.getWFSLayerInfo用法及代碼示例
- JavaScript window.close()用法及代碼示例
- JavaScript ArcGIS SceneView double-click事件用法及代碼示例
- JavaScript ArcGIS geometryEngineAsync.overlaps用法及代碼示例
- JavaScript ArcGIS Expand.when用法及代碼示例
- JavaScript ArcGIS Sublayer.JoinTableDataSource用法及代碼示例
- JavaScript ArcGIS FillSymbol3DLayer.outline用法及代碼示例
- JavaScript ArcGIS Ground.loadAll用法及代碼示例
- JavaScript Object valueOf()用法及代碼示例
- JavaScript ArcGIS LabelClass.repeatLabelDistance用法及代碼示例
- JavaScript ArcGIS KMLLayerView.when用法及代碼示例
- JavaScript ArcGIS Daylight.visibleElements用法及代碼示例
- JavaScript Uint8Array.of()用法及代碼示例
- JavaScript ArcGIS CIMSymbol.CIMTextSymbol用法及代碼示例
- JavaScript new Legend用法及代碼示例
- JavaScript Slider.effectiveMin用法及代碼示例
- JavaScript Sketch.classes用法及代碼示例
- JavaScript Sketch.visible用法及代碼示例
- JavaScript ArcGIS AreaMeasurement3D.analysis用法及代碼示例
注:本文由純淨天空篩選整理自arcgis.com大神的英文原創作品 watchUtils.PausableWatchHandle。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。