Commit 784c37b5 authored by Jérémie Garcia's avatar Jérémie Garcia
Browse files

bug fix

parent ff8fb1d4
...@@ -7,6 +7,20 @@ Mathematical utilities for curves processing ...@@ -7,6 +7,20 @@ Mathematical utilities for curves processing
Traj.Utils = { Traj.Utils = {
//events utilities
getStartEventName : function(){
return Traj.onmobile ? 'touchestart' : 'mousedown';
}
getMoveEventName : function(){
return Traj.onmobile ? 'touchemove' : 'mousemove';
}
getEndEventName : function(){
return Traj.onmobile ? 'toucheend' : 'mouseup';
}
ongoingTouchIndexById : function(idToFind) { ongoingTouchIndexById : function(idToFind) {
var i = 0, id; var i = 0, id;
for (i = 0; i < Traj.View.ongoingTouches.length; i++) { for (i = 0; i < Traj.View.ongoingTouches.length; i++) {
......
This diff is collapsed.
...@@ -93,11 +93,8 @@ Traj.Manager = { ...@@ -93,11 +93,8 @@ Traj.Manager = {
} else { } else {
var distance2 = Infinity; var distance2 = Infinity;
} }
Traj.Events.showContextMenu(distance < 0.6, distance2 < 0.6);
// TODO : separate distance for circular and for concat
if (distance < 0.6 || distance2 < 0.6) {
Traj.Events.showContextMenu();
}
}else{ }else{
Traj.Manager.currentCurve = null; Traj.Manager.currentCurve = null;
Traj.Manager.selectPreviousCurve(); Traj.Manager.selectPreviousCurve();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment