confused
confused

Reputation: 199

SVG kendodraggable

Does anyone here know how to make kendodraggable work on SVG?

I tried already but things just dont seem to work as I expected.

 $('#image').kendoDraggable({
            hint: function (element) {
               return element.clone();
            },
            dragstart: function (e) {
               $(e.target.parentElement).append(e.target);
            },
            drag: function (e) {
                e.target.setAttribute('x', newXPOS);
                e.target.setAttribute('y', newYPOS);
            },
            dragend: function (e) {
            },
            dragcancel: function (e) {
            }
     });

Thanks.

Upvotes: 0

Views: 96

Answers (1)

deepthi
deepthi

Reputation: 20

we can use transform attribute in svg and change its position.

transform=translate(tx,ty) or matrix(1,0,0,1,tx,ty) 

where tx,ty are your newXpos and newYpos

Upvotes: 1

Related Questions