question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

When use snappable property dragging moveable element appear virtual line shadow, then disappear

See original GitHub issue

Environments

  • Framework name: Vue
  • Framework version: 2.6.13
  • Moveable Component version: 0.27.2 moveable
  • Testable Address(optional):

Description

Hi @daybrush ,

When use snappable property, dragging moveable element appear virtual line shadow, after a few seconds disappear, but i don’t know why, please give me a help…

The following is my moveable config:

this.moveable = new Moveable(this.canvasViewer.getViewport(), {
      draggable: true,
      resizable: false,
      keepRatio: false,
      origin: false,
      throttleDrag: 0,
      throttleResize: 0,
      snappable: true,
      horizontalGuidelines: this.horizontalGuides?.getGuides(),
      verticalGuidelines: this.verticalGuides?.getGuides(),
      snapThreshold: 5,
      isDisplaySnapDigit: true,
      snapGap: true,
      snapDirections: { left: true, top: true, right: true, bottom: true, center: true, middle: true },
      elementSnapDirections: { left: true, top: true, right: true, bottom: true, center: true, middle: true },
      elementGuidelines: [],
      snapDigit: 0,
    }).on('clickGroup', (e: OnClickGroup) => this.onClickGroup(e))
      .on('dragStart', (e: OnDragStart) => this.onDragStart(e))
      .on('drag', (e: OnDrag) => this.onDrag(e))
      .on('dragEnd', (e: OnDragEnd) => this.onDragEnd(e))

The phenomenon of my situation…

89F8805E-F2A7-49D9-A33F-33D168C96CBF

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:9 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
anxparacommented, Dec 7, 2022

Pasting what i mentioned in the other related issue: “I’ve seen similar artifacts with animation libraries and I learned that the solution was to add “will-change: transforms;” to anything i planned on animating. maybe that also applies here?”

0reactions
daybrushcommented, Dec 2, 2022
Read more comments on GitHub >

github_iconTop Results From Across the Web

Using the HTML5 Drag and Drop API - web.dev
The HTML5 Drag and Drop API means that we can make almost any element on our page draggable. In this post we'll explain...
Read more >
Adjust corner radius and smoothing – Figma Help Center
Corner radius rounds the corner where two lines meet. Use this to create shapes with rounded corners. Corner smoothing adjusts a rounded corner...
Read more >
Drag operations - Web APIs - MDN Web Docs - Mozilla
When an image or link is dragged, the URL of the image or link is set as the drag data, and a drag...
Read more >
How to use rulers, grids, and guides in Illustrator
To snap objects to gridlines, choose View > Snap To Grid, select the object you want to move, and drag it to the...
Read more >
Grid snapping - Unity - Manual
Moving the grid to the handle of a Game Object ... From the grid visibility drop-down menu ( ) in the Grid and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found