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

当赋予元素draggable 和resizable 两种能力后。resize的时候 元素跳动 #807

Open
caixiaojian opened this issue Jan 19, 2016 · 2 comments

Comments

@caixiaojian
Copy link

_代码如下:_

    <style>
        #aaa {
              border: 1px solid #89B;
              background: #BCE;
              height: 200px;
              width: 80px;
              cursor: move;
              position: absolute;
              top: 120px;
              left: 120px;
          }
    </style>

<body>
    <h1>请通过shift键让它依照现时的长高之比进行缩放</h1>
    <div id="aaa" ms-controller="root"  ms-css-left="x" ms-css-top="y" ms-resizable="root,resizable">
    </div>
    <script>
        require(["resizable/avalon.resizable"], function() {
            var model = avalon.define( {
                $id : "root",
                x : 120,
                y :120,
                resizable :  {
                    start: function(e) {
                        e.stopPropagation();
                    },
                    drag: function(e, data) {

                        e.stopPropagation();
                    },
                    resize : function (e , data) {

                        e.stopPropagation();
                    },

                    stop : function (e) {
                        e.stopPropagation();
                    }
                }
            })
            avalon.scan()
        })
    </script>

拖拽元素没有问题,但是当拉住元素的四个角resize结束后,元素的left 和top 变化导致 元素跳动,应该是修改了我上次提的一个拖拽bug导致的问题。

@caixiaojian
Copy link
Author

昨天的pull request 修改了这个问题,但是快速拖拽元素后又不流畅了,鼠标脱离元素就不能拖了/(ㄒoㄒ)/~~

@yuhaoju
Copy link
Contributor

yuhaoju commented Jan 20, 2016

又修了一次,应该好了

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

No branches or pull requests

2 participants