antvis / g6-editor

532 stars 172 forks source link

如何自定义 koni 锚点 click 事件,以及自定义锚点样式? #91

Closed draco-china closed 2 years ago

draco-china commented 5 years ago
  1. 尝试了好久都没有找到自定义 koni 锚点 click 自定义的方式
  2. koni 锚点的样式也没有找到对应的修改方式 以下是个人暂时使用的方法自定义样式
    const anchorDom = editor.getCurrentPage().get('_controllers').orbit.satelliteCache[0].dom
    anchorDom.setAttribute('style', '')
    anchorDom.setAttribute('class', 'anchor-icon')
.anchor-icon {
    position: absolute;
    width: 11px;
    height: 11px;
    cursor: copy;
    background-image: url(./svg/add.svg)
 }

希望能告知 koni 锚点自定义 click事件的方法,谢谢🙏

liaohongewi commented 5 years ago

现在有解决的方式嘛

draco-china commented 5 years ago

我目前通过手动修改dom的方式自定义

发自我的 iPhone

在 2019年7月12日,上午10:22,L notifications@github.com 写道:

现在有解决的方式嘛

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

liaohongewi commented 5 years ago

那有办法把koni的点击事件取消或者把这个锚点删除嘛,koni写成组件不知道哪里控制这些

draco-china commented 5 years ago

自定义锚点就可以替换默认的,点击事件其实是复制,关闭这个指令就能解决

在 2019年7月14日星期日,L notifications@github.com 写道:

那有办法把koni的点击事件取消或者把这个锚点删除嘛,koni写成组件不知道哪里控制这些

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/antvis/g6-editor/issues/91?email_source=notifications&email_token=AFJ5L4RIXZBQYDOZWSYOZZTP7MXBFA5CNFSM4GRI7AP2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZ4GCGY#issuecomment-511205659, or mute the thread https://github.com/notifications/unsubscribe-auth/AFJ5L4QQTQS6KSDOXANGDBTP7MXBFANCNFSM4GRI7APQ .

liaohongewi commented 5 years ago

好的 谢谢啦