Selection
通过鼠标选中Shape
的 Action, 当使用 selection
插件的时候,这个 action 会在 selection
插件里被插件在每个Shape
上边添加上。当然也可以自己在Shape
实例上边添加此 action 来替换掉之前的 selection action,用于添加 initDrawFunc 来自定义 selection action 样式
Options
ts
export type SelectionActionOptions = {
initDrawFunc?: SelectionDrawFunc
}
实例属性
selected
是否选中了当前Shape
实例方法
getSelectionPlugin
获取当前Selection
插件实例
getSelectionShape
获取当前选中的Shape
的 selection 的Svg.js
的 shape 实例
getSelectionId
获取当前选中的Shape
的 selection 的 id
disableSelection
禁用当前Selection
插件
enableSelection
启用当前Selection
插件
destroy
ImageMark 销毁时或者 unuseAction 时候调用