Class: TransactionManager

TransactionManager

标绘对象编辑事务管理类,维护 Transaction 的列表。

new TransactionManager(map, options)

Usage
// 浏览器
<script type="text/javascript" src="../../web/libs/plotting/leaflet/11.3.0/iclient-plot-leaflet-es6.min.js"></script>
<script>
  new L.supermap.plotting.TransactionManager(map, options);
  
  // 另一种写法
  L.supermap.plotting.transactionManager(map, options);

  
</script>

// ES6 Import
import { TransactionManager } from '../../public/iclient-plot/iclient-plot-leaflet-es6.min.js';

new TransactionManager(map, options);

leaflet/plot/TransactionManager.js, line 2
Name Type Description
map L.Map

地图。

options Object

扩展参数。

Name Type Description
maxCount number 可选

可撤销事务步数。

Methods

add(transaction)

leaflet/plot/TransactionManager.js, line 71

添加事务。

Name Type Description
transaction Transaction

事务。

destroy()

leaflet/plot/TransactionManager.js, line 51

销毁对象。

redo()

leaflet/plot/TransactionManager.js, line 98

重做。

setMaxCount(maxCount)

leaflet/plot/TransactionManager.js, line 62

设置可撤销事务步数。

Name Type Description
maxCount number

可撤销事务步数。

undo()

leaflet/plot/TransactionManager.js, line 84

撤销。