line tool is now working under new message format

This commit is contained in:
mohamed-ahmed 2013-11-26 22:09:39 +00:00
parent 5c51d939fa
commit 5f8ab24ffd
2 changed files with 9 additions and 7 deletions

View File

@ -66,7 +66,7 @@ define [
# @param {number} y2 1) the y of the second point
# 2) undefined
update: (data) ->
console.log "in line UPDATE(data): "
console.log "in line-UPDATE(data): "
console.log data
x1 = data.shape.coordinate.firstX
@ -76,9 +76,9 @@ define [
if @obj?
# addign points from the pencil
if _.isBoolean(x2)
add = x2
# if adding points from the pencil
if _.isBoolean(data.adding)
add = data.adding
pathPercent = "L" + x1 + " " + y1
@definition.data[0] += pathPercent

View File

@ -574,10 +574,11 @@ define [
color: data.shape.color,
thickness : data.shape.thickness
}
adding : false #tell the line object that we are NOT adding points but creating a new line
}
console.log("lineObject: ")
console.log(lineObject)
@makeShape(type, lineObject)
console.log("lineObject: ");
console.log(lineObject);
@makeShape(type, lineObject);
else
console.log("points[i]: ");
console.log(points[i]);
@ -591,6 +592,7 @@ define [
color: data.shape.color,
thickness : data.shape.thickness
}
adding : true #tell the line object that we ARE adding points and NOT creating a new line
}
console.log("lineObject: ")
console.log(lineObject)