Giter Club home page Giter Club logo

vue-ruler-tool's People

Contributors

gorkys avatar hunterxing avatar leehonleon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

vue-ruler-tool's Issues

等比例缩放问题

请问一下这个可以实现等比例缩放吗,就是实际窗口是500200,但是想让标尺表示17921080

小bug和适配主题解决思路

刻度出现了两个0,将刻度第一个删掉
rulerTool.value.xScale.shift(); rulerTool.value.yScale.shift()

刻度是用的背景设置的,把图片下载下来修改为透明图改改颜色,再覆盖回去就可以支持不同主题切换了

刻度数值

[当超出滚动条时,刻度数值不显示怎么解决
1ECA9A86-BC35-42b8-9795-84C42F51CA96

当标尺组件所在父容器偏离浏览器窗口时,创建参考线位置不准

建议作者调整一下topSpacing与leftSpacing的获取方式。
源码:

this.topSpacing = document.getElementById('levelRuler').offsetParent.offsetTop
this.leftSpacing =document.getElementById('verticalRuler').offsetParent.offsetLeft

调整:

this.topSpacing = document.getElementById('levelRuler').getBoundingClientRect().y;
this.leftSpacing =document.getElementById('verticalRuler').getBoundingClientRect().x;

测试后暂未发现问题

在vite项目中引入出现异常

根据文档引入
import VueRulerTool from 'vue-ruler-tool'
Vue.component('vue-ruler-tool', VueRulerTool)
vite出现异常
`Could not resolve "./components/vue-ruler-tool"

node_modules/vue-ruler-tool/src/index.js:4:24:
  4 │ export { default } from './components/vue-ruler-tool'
    ╵                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

`

Ruler on top of drag and drop grid

Any tips on adding the vue-ruler on top of an existing drag and drop zone / grid? We added the rulers graphically, but we are now debating the implementation of the draggable rulers on top of our dropzone. Any tips would be really helpful.

:v-model 双向绑定错误

<vue-ruler-tool
  :content-layout="{left:200,top:100}"
  :is-scale-revise="true"
  :v-model="presetLine"
>
</vue-ruler-tool>

这个应该是 v-model 不是 :v-model

style绑定的一个问题

我用npm安装后按照文档写了一个示例,发现水平和垂直的虚线是可以拖动并且有动画效果的, 但是无法将虚线固定到屏幕上. 即松开鼠标后虚线显示不见了.
后来发现是
<div :style="{top:verticalDottedTop + 'px'}" class="vue-ruler-ref-dot-h" /> <div :style="{left:horizontalDottedLeft + 'px'}" class="vue-ruler-ref-dot-v" />
中: style绑定的时候有问题.
我重新定义了两个响应式data: hStyle和lStyle,
修改上述代码为... :style="hStyle"...:style="lStyle" , 并修改方法dottedLineMove 中对xy 赋值的地方:

const topPx = this.verticalDottedTop + "px"; this.hStyle = { top: topPx };

const leftPx = this.horizontalDottedLeft + "px"; this.lStyle = { left: leftPx };

然后 就可以了.

我的Vue版本是2.6.10, 感觉像是兼容性问题.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.