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

How to remove origin red dot ? #1105

Open
vaynevayne opened this issue Mar 30, 2024 · 1 comment
Open

How to remove origin red dot ? #1105

vaynevayne opened this issue Mar 30, 2024 · 1 comment

Comments

@vaynevayne
Copy link

Environments

  • Framework name: moveable
  • Framework version: 0.53.0
  • Moveable Component version:
  • Testable Address(optional):
image

Description

const moveableRef = new Moveable(this.minimapContainerDom, {
      target: this.viewportDom,
      draggable: true,
      snappable: true, // 搭配bounds使用
      // scalable: true, // 暂不支持
      bounds: {
        left: 0,
        top: 0,
        right: 0,
        bottom: 0,
        position: 'css',
      },
    });
    moveableRef
      .on('dragStart', () => {
        this.options.refresh = false;
      })
      .on('drag', (e) => {
        const camera = this.context.canvas.getCamera();
        const zoom = Math.pow(2, camera.getZoom());
        camera.pan(e.delta[0] / this.ratio / zoom, e.delta[1] / this.ratio / zoom);

        e.target.style.transform = e.transform;
      })
      .on('dragEnd', () => {
        this.options.refresh = rawRefresh;
      });
@vaynevayne vaynevayne changed the title How to remove center red dot please ? How to remove origin red dot ? Apr 2, 2024
@JKannekens
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants