Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jeremie Garcia
Trajectoires
Commits
486193a6
Commit
486193a6
authored
Mar 02, 2016
by
Jérémie Garcia
Browse files
basic commit for jack version
parent
af2a764d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Traj/server/interfaces/Trajectoires.html
View file @
486193a6
...
...
@@ -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>
...
...
Traj/server/interfaces/js/manager.js
View file @
486193a6
...
...
@@ -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
])
{
...
...
Traj/server/interfaces/js/timedCurve.js
View file @
486193a6
...
...
@@ -237,3 +237,10 @@ TimedCurve.prototype.getClosestPointIndex = function(pos) {
}
return
idx
;
}
TimedCurve
.
prototype
.
simplifySmart
=
function
(
tolerance
){
//todo
return
this
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment