How to differentiate betwen clicking and DragDrop?

Hello out there.

This might be a javascript issue, so not sure if this is the right place for this question…

I am using on one image element

zii.widgets.jui.CJuiDraggable

and at the same time this element has also

application.extensions.fancybox.EFancyBox

Both extensions/widgets work perfect.

But after dragging the element to the destination, the Clicking Event is obviously fired and the fancybox opens.

Is there any way to prevent the run of the FancyBox when the element is not just clicked but dragged & dropped?

Any ideas that point me in the right direction are highly appreciated…

gb

Hey gb5256,

Could you please Share your code here.So,that i can get exactly where is the issues. :)

Here is the code I am using:




            $this->beginWidget('zii.widgets.jui.CJuiDraggable', array(

                // additional javascript options for the draggable plugin

                'options'=>array(

                    'scope'=>'myScope',

                    'revert'=> 'invalid',

                    'snap'=> '.ui-droppable-image',

                    'snapMode'=> 'inner',

                    'snapTolerance' => '40',

                    'opacity' => 1,

                    'cursor' => "move",

                    'htmlOptions'=>array('id'=>$battleImageDetail->showImages),


                ),

            ));

                    

                    $this->widget('ext.justintimer.EJustInTimeR', array(

                        'image' => $battleImageDetail->showImages,

                        'display' => 'micro_square',

                        'a_id' => $battleImageDetail->showImages,

                        'alt' => 'here should be an image...',

                        'rel' => 'gallery_battle',

                        'title' => $battleImageDetail->showImagesID

                    )); 


            $this->endWidget();






So I am basically searching for a way to unbind the click (which would trigger the Fancybox) when the image is dragged.

Any ideas how to do that?