daybrush / moveable

Moveable! Draggable! Resizable! Scalable! Rotatable! Warpable! Pinchable! Groupable! Snappable!
https://daybrush.com/moveable/
MIT License
10.08k stars 618 forks source link

svg image inside div drag & clip #337

Closed kujeah closed 3 years ago

kujeah commented 4 years ago

Environments

Description

I have a question.

Can we use moveable by adding svg within div?

Below is the code of div that I designated as moveable.

<div class="moveable" style="position: absolute; display: flex; flex-direction: column; width: 172.8px; height: 216.16px; transform: translate(68.5965px, 52.1053px) rotate(0deg) scale(1, 1); clip-path: inset(0px);">

  <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 172.8 216.16" preserveAspectRatio="none">
    <image xlink:href="[image url]" width="172.8" height="216.16" class="not-control"></image>
  </svg>

</div>

There is no problem when dragging the code, but if use clip, a problem occurs when drag.

Screen Shot 2020-10-22 at 17 37 00 Screen Shot 2020-10-22 at 17 37 13

What advice do you have on the issue?

daybrush commented 4 years ago

@kujeah

Oh, i will fix it.

daybrush commented 3 years ago

moveable's new version is released. Check it again.