avoid unnecessary JS bindings by using narrower conditions, remove logging
This commit is contained in:
@@ -23,6 +23,7 @@ Canvas {
|
|||||||
ctx.save();
|
ctx.save();
|
||||||
ctx.lineWidth = root.penWidth;
|
ctx.lineWidth = root.penWidth;
|
||||||
ctx.strokeStyle = root.penColor;
|
ctx.strokeStyle = root.penColor;
|
||||||
|
ctx.lineJoin = "round";
|
||||||
ctx.lineCap = "round";
|
ctx.lineCap = "round";
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.moveTo(points[0].x, points[0].y);
|
ctx.moveTo(points[0].x, points[0].y);
|
||||||
|
|||||||
@@ -32,10 +32,10 @@ CustomMouseArea {
|
|||||||
if (root.visibilities.isDrawing && (event.buttons & Qt.LeftButton)) {
|
if (root.visibilities.isDrawing && (event.buttons & Qt.LeftButton)) {
|
||||||
root.drawing.points.push(Qt.point(x, y));
|
root.drawing.points.push(Qt.point(x, y));
|
||||||
root.drawing.requestPaint();
|
root.drawing.requestPaint();
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (root.inLeftPanel(root.popout, x, y)) {
|
if (!(event.buttons & Qt.LeftButton) && root.inLeftPanel(root.popout, x, y)) {
|
||||||
console.log("set -2 z");
|
|
||||||
root.z = -2;
|
root.z = -2;
|
||||||
root.panels.drawing.expanded = true;
|
root.panels.drawing.expanded = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user