我将http://enyojs.com/api/#enyo.DragAvatar中的示例代码复制到一个 jsfiddle 中以启动并测试它。现在 dragAvatar 甚至不会出现,我不知道为什么不出现。如果我将图像放在 de dragavatar 之外,它会显示出来,所以它不是图像 url...
http://jsfiddle.net/joopmicroop/qsSCU/
enyo.kind({
name: "App",
handlers: {
ondrag: "drag",
ondragfinish: "dragFinish",
},
components: [
{name:"dragAvatar", kind:"enyo.DragAvatar", showing:true, components: [
{kind:'enyo.Image', src:'http://s9.postimage.org/h3t5cbidn/enyo_icon.jpg'}]
}
],
drag: function(inSender, inEvent) {
this.$.dragAvatar.drag(inEvent);
},
dragFinish: function(inSender, inEvent) {
//this.$.dragAvatar.hide();
}
});