Fix issue 49: take into account scroll offsets with canvas
git-svn-id: http://svg-edit.googlecode.com/svn/trunk@226 eee81c28-f429-11dd-99c0-75d572ba1dddmaster
parent
579dac1219
commit
3ab00a7148
|
@ -583,8 +583,8 @@ function SvgCanvas(c)
|
|||
// and do nothing else
|
||||
var mouseDown = function(evt)
|
||||
{
|
||||
var x = evt.pageX - container.parentNode.offsetLeft;
|
||||
var y = evt.pageY - container.parentNode.offsetTop;
|
||||
var x = evt.pageX - container.parentNode.offsetLeft + container.parentNode.scrollLeft;
|
||||
var y = evt.pageY - container.parentNode.offsetTop + container.parentNode.scrollTop;
|
||||
switch (current_mode) {
|
||||
case "select":
|
||||
started = true;
|
||||
|
@ -741,8 +741,8 @@ function SvgCanvas(c)
|
|||
var mouseMove = function(evt)
|
||||
{
|
||||
if (!started) return;
|
||||
var x = evt.pageX - container.parentNode.offsetLeft;
|
||||
var y = evt.pageY - container.parentNode.offsetTop;
|
||||
var x = evt.pageX - container.parentNode.offsetLeft + container.parentNode.scrollLeft;
|
||||
var y = evt.pageY - container.parentNode.offsetTop + container.parentNode.scrollTop;
|
||||
var shape = svgdoc.getElementById(getId());
|
||||
switch (current_mode)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue