如何在拖放后拖动图像克隆。? [英] How to drag image clone after drop.?

查看:78
本文介绍了如何在拖放后拖动图像克隆。?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的图像在旋转后拖动,但是当它下降时我无法第一次拖动图像。这是图像拖放的代码。dhtmlgoodies_xpPane li .rotatable我可以拖动此图像克隆并放下工作 - 区域。下载后我无法第一次拖动图像克隆。但是在旋转和调整大小后克隆是可拖动的。这是我的问题....

My image is drag after rotate but I can't drag image first time when it drops.this is a code for image drag and drop."dhtmlgoodies_xpPane li .rotatable" I can drag this image clone and drop on "working-area". I can't drag image clone first time after drop. but the clone is draggable after rotate and resize. this is my problem....

$(document).ready(function(){
  $('#dhtmlgoodies_xpPane li .rotatable').draggable({appendTo: "working-area", helper: "clone" });
  $('#working-area .rotatable').live('click', function(event) {
              test = test + 90;
              $(this).rotate({ angle: test ,  appendTo: "#working-area"}).draggable();
           });
$('#working-area .rotatable').live('mousemove', function(event) {
          $(this).resizable({appendTo: "#working-area"}).parent().draggable();});
      $( "#working-area" ).droppable({
            activeClass: "ui-state-default",
            hoverClass: "ui-state-hover",
            accept: "#dhtmlgoodies_xpPane li .rotatable",
            drop: function( event, ui ) {
                *** $(this).append($(ui.helper).clone().draggable());}
        }).mousemove(function(e){
            var x = e.pageX - this.offsetLeft;
            var y = e.pageY - this.offsetTop;
              $('#status2').html("X = "+ x +', '+"Y = "+ y);
          });
 });

请给我一个解决方案。并参考一些代码....我正在使用jquery。和语言是PHP。
* 此行负责拖放后拖动。
但是当添加调整大小和旋转功能时它将无法工作。

Please give me a solution. and refer some code.... I'm using jquery. and language is PHP. * this line responsible for drag after drop. but when resizing and rotate function is added it will not work.

推荐答案

drop:function(event,ui) {
$(this).append($(ui.helper).clone()。draggable());}
})

drop: function( event, ui ) { $(this).append($(ui.helper).clone().draggable());} })

这篇关于如何在拖放后拖动图像克隆。?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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