单个EmberView做resizable()和draggable() [英] Single EmberView doing resizable() and draggable()

查看:164
本文介绍了单个EmberView做resizable()和draggable()的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据问题的答案 Ember .js draggable和droppable jqueryUI / native拖放mixin。

As per answer of the question Ember.js draggable and droppable jqueryUI / native Drag and drop mixin.

我已经实现了 JQUERY UI拖放,调整大小 mixins in EmberJS 。但我的问题是我想要同样的观点来拖动和调整大小。我试图以不同的方式实施。你可以查看这个jsfiddle http://jsfiddle.net/codejack/TGwxf/1/该视图仅获取最后一个调用mixin的UI行为。

I have implemented JQUERY UI drag, drop, resize mixins in EmberJS. But my problem is i want the same view to do drag and resize. I tried to implement in different ways. You can check in this jsfiddle http://jsfiddle.net/codejack/TGwxf/1/ The view gets UI behaviour of last called mixin only.

有没有办法在拖放,删除,调整大小相同的视图时获得超过1个行为?

Is there any way to get more than 1 behaviour in drag,drop,resize for same view?

编辑我发现原因是第二个混合覆盖 uievents,uiOptions,uiType 变量。但是,仍然不知道如何避免这种...只有这样,我才能看到自己编写的Widget与自己的事件...任何方式来解决这个问题。

EDIT I found out the reason is the 2nd mixin overrides the uievents,uiOptions,uiType variables. But still dont know how to avoid that... only way i can see is writing own Widgets with own events...any way to solve that?

推荐答案

虽然@ user1128571给出了一个部分解决问题的解决方案,但是我是如何解决问题的。我为互动添加了不同的混合,因为这将解决问题。

Though the @user1128571 gave a solution which partly solves the problem, here is how i corrected the issue. I added different mixins for Interactions as that will solve the problem.

https://github.com/thecodejack/jquery-ui-ember/blob/master/js/app.js#L104

检查 github页面该模块知道它是如何工作的。

check the github pages of the module to know how exactly it works

这篇关于单个EmberView做resizable()和draggable()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆