Skip to content

Commit

Permalink
Removed methods from global namespace. Center rect on control point.
Browse files Browse the repository at this point in the history
  • Loading branch information
ivmartel committed Jun 12, 2012
1 parent 67794dd commit 120ce94
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/tools/livewire.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@ dwv.tool.Livewire = function(app)
var parentPoints = [];
var tolerance = 5;

clearParentPoints = function() {
function clearParentPoints() {
for( var i = 0; i < app.getImage().getSize().getNumberOfRows(); ++i ) {
parentPoints[i] = [];
}
};
}

clearPaths = function() {
function clearPaths() {
path = new dwv.math.Path();
currentPath = new dwv.math.Path();
};
}

var scissors = new dwv.math.Scissors();
scissors.setDimensions(
Expand Down Expand Up @@ -186,7 +186,7 @@ dwv.tool.DrawLivewireCommand = function(livewire, app)
}
for( var j=0; j < livewire.controlPointIndexArray.length; ++j ) {
p = livewire.getPoint(livewire.controlPointIndexArray[j]);
context.fillRect(p.getX(), p.getY(), 5, 5);
context.fillRect(p.getX()-3, p.getY()-3, 5, 5);
}
context.stroke();
//context.closePath();
Expand Down

0 comments on commit 120ce94

Please sign in to comment.