Skip to content
Snippets Groups Projects
Commit 2cf9d3c0 authored by Jonathan Wilkes's avatar Jonathan Wilkes
Browse files

fix regression where "mouse" message could give different coords than "mouseup" in same position

parent 78e6e154
No related branches found
No related tags found
No related merge requests found
...@@ -71,7 +71,7 @@ var canvas_events = (function() { ...@@ -71,7 +71,7 @@ var canvas_events = (function() {
return false; return false;
}, },
mousedown: function(evt) { mousedown: function(evt) {
// tk events are one greater than html5... // tk events (and, therefore, Pd evnets) are one greater than html5...
var b = evt.button + 1; var b = evt.button + 1;
var mod; var mod;
// For some reason right-click sends a modifier value of "8", // For some reason right-click sends a modifier value of "8",
...@@ -94,8 +94,9 @@ var canvas_events = (function() { ...@@ -94,8 +94,9 @@ var canvas_events = (function() {
// evt.pageX + " y: " + evt.pageY + // evt.pageX + " y: " + evt.pageY +
// " button: " + (evt.button + 1)); // " button: " + (evt.button + 1));
pdgui.pdsend(name + pdgui.pdsend(name +
" mouseup " + evt.pageX + " " + evt.pageY + " " + " mouseup " + (evt.pageX + svg_view.x) + " " +
(evt.button + 1)); (evt.pageY + svg_view.y) + " " +
(evt.button + 1));
evt.stopPropagation(); evt.stopPropagation();
evt.preventDefault(); evt.preventDefault();
}, },
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment