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

支持自动贴合通过 snapToTarget 属性指定的外部元素 #28

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

ferrinweb
Copy link

因有自动对齐贴合外部参考线、盒子的需求,故增加了 snap-to-target 属性。

snapToTarget

类型: String

必需: false

默认: null

当调用snap时,定义组件对齐到其他外部元素。

<!-- guide-line 为外部元素样式名 -->
<vue-draggable-resizable
  :snap="true"
  :snap-tolerance="20"
  snap-to-target="guide-line"
/>

注意:本次修改增加了 'line-v' (参考线样式名片段)字符串的判断(line: 749),这个也许是该组件所不需要的,但该判断并不影响功能实现。

@gorkys gorkys force-pushed the master branch 2 times, most recently from b8049dc to 0fde79f Compare May 14, 2020 14:25
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

Successfully merging this pull request may close these issues.

1 participant