Gitlab CSE Unil

Commit c206c6aa authored by Julien Furrer's avatar Julien Furrer
Browse files

Small fixes to "Lines" tool

parent cf474af6
......@@ -95,6 +95,8 @@ define(["paper", "helper/utils"], function (paper, utils) {
var newPath = _path.clone();
//newPath.closed = true;
newPath.style = paper.project.currentStyle;
newPath.strokeCap = 'round';
newPath.strokeJoin = 'round';
newPath.fillColor = null;
newPath.data.type = TOOL_TYPE;
newPath.data.tId = "a" + newPath._id;
......@@ -127,7 +129,7 @@ define(["paper", "helper/utils"], function (paper, utils) {
if (hitSelected && hitSelected.item && hitSelected.item.selected &&
hitSelected.item.data.type === TOOL_TYPE) {
_path = hitSelected.item;
_path.opacity
// _path.opacity
//console.log(hitSelected);
// Click on the stroke of a selected path
if (hitSelected.type === 'stroke') {
......@@ -147,9 +149,14 @@ define(["paper", "helper/utils"], function (paper, utils) {
// Start a new Drawing
paper.project.deselectAll();
_path = new paper.Path();
_path.strokeColor = paper.project.currentStyle.strokeColor || paper.project.currentStyle.fillColor;
_path.fillColor = null;
_path = new paper.Path({
strokeColor: paper.project.currentStyle.strokeColor || paper.project.currentStyle.fillColor,
fillColor: null,
strokeCap: 'round',
strokeJoin: 'round'
});
// _path.strokeColor = paper.project.currentStyle.strokeColor || paper.project.currentStyle.fillColor;
// _path.fillColor = null;
_drawing = true;
_path.add(event.point);
}
......@@ -170,7 +177,7 @@ define(["paper", "helper/utils"], function (paper, utils) {
if (_segment) { _segment.remove(); }
_segment = new paper.Path(event.downPoint, event.point);
_segment.strokeColor = paper.project.currentStyle.strokeColor || paper.project.currentStyle.fillColor;
_segment.dashArray = [10, 4];
// _segment.dashArray = [10, 4];
} else if (_editing) {
if (_segment) {
_changed = true;
......
Supports Markdown
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