Giter Club home page Giter Club logo

flowgrid's People

Contributors

tangdaohai avatar tm-roamer avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

elephantme

flowgrid's Issues

当拖拽容器上方的元素高度过大时,拖拽时的阴影与鼠标坐标不一致

https://github.com/tm-roamer/flowgrid/blob/master/example/base.html#L15

以此demo为例子,在btn-group 增加高度height:300px; 并点击添加多个节点(超过首屏)之后,拖拽下面的元素即可重现。

后发现在此行获取鼠标坐标的方法似乎不恰当 https://github.com/tm-roamer/flowgrid/blob/master/src/dragdrop.js#L52
pageY是从dom顶部开始计算高度,而应该从浏览器窗口开始计算高度,似乎使用clientY更合适

建议优化emit事件大小写问题

在监听dragStart等事件时vue会抛出一个警告:

[Vue tip]: Event "dragend" is emitted in component <FgContainer> but the handler is registered for "dragEnd". 
Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. 
You should probably use "drag-end" instead of "dragEnd".

当前vue版本会将$emit发出的事件转为小写,html中也不区分大小写,所以vue给出了一个告警,建议将事件名称规范为中划线格式。

【feature】建议增加动态计算高度

src/fg-container.vue Line31

// fg-layout样式
itemStyle: function () {
 let max = this.getMaxRowAndCol();
 return {
   height: max.row * this.opt.cellH + this.opt.padding.bottom + 'px'
}

这样不会出现纵向滚动条~~~

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.