Commit 486193a6 authored by Jérémie Garcia's avatar Jérémie Garcia
Browse files

basic commit for jack version

parent af2a764d
......@@ -133,6 +133,8 @@
<div style="height:20px"> </div>
<a id="playButton" data-role="button" data-theme="a" style="background: rgba(250, 250, 250, 0.8); padding: 5px; width:50px; height:30px; line-height: 30px;">Play</a>
<a onClick="javascript:Traj.Manager.simplifyCurrentCurve2(0.01);" data-role="button" data-theme="a" style="background: rgba(250, 250, 250, 0.8); padding: 5px; width:50px; height:30px; line-height: 30px;">Simpl 1</a>
<a onClick="javascript:Traj.Manager.simplifyCurrentCurve2(0.1);" data-role="button" data-theme="a" style="background: rgba(250, 250, 250, 0.8); padding: 5px; width:50px; height:30px; line-height: 30px;">Simpl 2</a>
</div>
</div>
......
......@@ -477,6 +477,19 @@ Traj.Manager = {
},
simplifyCurrentCurve2 : function (tolerance){
var currentCurve = Traj.Manager.trajectories[Traj.Manager.currentCurveIndex];
// console.log(currentCurve);
if (currentCurve != undefined) {
var newCurve = currentCurve.simplifySmart(tolerance);
Traj.Manager.trajectories[Traj.Manager.currentCurveIndex] = newCurve;
}
Traj.View.current_repaint();
},
SelectandRedrawEdit : function (){
var curveIdx = Traj.Manager.currentCurveIndex;
if (Traj.Manager.trajectories[curveIdx]) {
......
......@@ -237,3 +237,10 @@ TimedCurve.prototype.getClosestPointIndex = function(pos) {
}
return idx;
}
TimedCurve.prototype.simplifySmart = function(tolerance){
//todo
return this;
}
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