Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🤔使用interactjs绑定自定义绘制的rect事件无法触发 #2907

Open
3 tasks
ghfkui opened this issue Sep 21, 2024 · 0 comments
Open
3 tasks

🤔使用interactjs绑定自定义绘制的rect事件无法触发 #2907

ghfkui opened this issue Sep 21, 2024 · 0 comments
Labels
💤 inactive 不活跃的 Issue 或 PR, 30天没有回复 next 2.0-next 版本的问题 ❔question 疑问/使用问题

Comments

@ghfkui
Copy link

ghfkui commented Sep 21, 2024

🏷 Version

Package Version
@antv/s2 2.0.0-next.26
@antv/s2-react
@antv/s2-vue

Sheet Type

  • [1] PivotSheet
  • [1] TableSheet
  • GridAnalysisSheet
  • StrategySheet
  • EditableSheet

🖋 Description

🔗 Reproduce Link

基于官网在单元格内绘制自定义图形demo ,想使用interactjs将
蓝色圆形绑定draggable以移动图形的位置,代码如下

const rect = new Rect({
        style: {
          x: 300,
          y: 200,
          width: 100,
          height: 100,
          fill: '#1890FF',
          fillOpacity: 0.8,
          stroke: '#F04864',
          strokeOpacity: 0.8,
          lineWidth: 4,
          radius: 100,
          zIndex: 999,
        },
      }),
const canvas = s2.getCanvas()
canvas.appendChild(rect)
interact(rect, {
      context: canvas.document as any
    }).draggable({
      startAxis: 'xy',
      lockAxis: 'start',
      listeners: {
        start(event) {
          console.log('start')
        },
        move(event) {
          console.log('event')
        }
      }
    })

😊 Expected Behavior

触发start和move事件

😅 Current Behavior

没有触发任何事件

@ghfkui ghfkui added the ❔question 疑问/使用问题 label Sep 21, 2024
@github-actions github-actions bot added the next 2.0-next 版本的问题 label Sep 21, 2024
@github-actions github-actions bot added the 💤 inactive 不活跃的 Issue 或 PR, 30天没有回复 label Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💤 inactive 不活跃的 Issue 或 PR, 30天没有回复 next 2.0-next 版本的问题 ❔question 疑问/使用问题
Projects
None yet
Development

No branches or pull requests

1 participant