Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Ext.graph.Clipboard

tianmo edited this page Aug 30, 2012 · 3 revisions

实现剪切板的功能


使用方法:

Ext.create('Ext.graph.Clipboard', {
 graph: this//Ext.graph.Panel
});

配置

graph

绘图组件容器

Type: Ext.graph.Panel

方法

.isEmpty()

剪切板是否为空

返回:boolean

.cut(graph, cells)

剪切

  1. graph:要剪切的元素所在的绘图容器,如果没有,则是剪切板容器的graph。
  2. cells:要剪切的元素,如果没有,则为graph选中的元素

返回:剪切的元素集合

.copy(graph, cells)

复制

  1. graph:要剪切的元素所在的绘图容器,如果没有,则是剪切板容器的graph。
  2. cells:要剪切的元素,如果没有,则为graph选中的元素

返回:复制的元素集合

.paste(graph, xy)

粘贴

  1. graph:目标容器,如果没有,则是剪切板容器的graph。
  2. xy:目标位置,如果没有,则默认当前要粘贴的元素的位置

上一个:Ext.graph.Panel 下一个:Ext.graph.History

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /