escobar5/raphael-pan-zoom

offsetX and offsetY on Zoom mode

ucola opened this issue · 2 comments

Hi

I try on zoom mode to create some element on the paper of Raphael. But the problem is, that on zoom mode the offsetX and offsetY coresond not the zoomed offsetX and offsetY.

newSet.click(function(event){

          if(clickZoom == false){
            var panZoom = paper.panzoom({ initialZoom: 5, initialPosition: { x: 50, y: 50} });
            clickZoom = true;

          }else{
            var cX = event.offsetX;
            var cY = event.offsetY;
            console.log(cX+' - '+cY);

            var circle = paper.circle(cX, cY, 10).attr({fill: "yellow"});

          }

        });

are they possible to do on zoom mode? or did you have a solution for this?

thank you for your help

I am also facing the same issue. Is there any help?

+1 I'm still experimenting with it