minor, param renaming
"showTextRectangle" -> "showElementBounds" and "drawTextRectangle" -> "drawElementBounds".
This commit is contained in:
parent
27a398d0e1
commit
f087570eb5
8
area.js
8
area.js
|
|
@ -317,8 +317,8 @@ var DrawingArea = new Lang.Class({
|
||||||
for (let i = 0; i < this.elements.length; i++) {
|
for (let i = 0; i < this.elements.length; i++) {
|
||||||
cr.save();
|
cr.save();
|
||||||
|
|
||||||
this.elements[i].buildCairo(cr, { showTextRectangle: this.grabbedElement && this.grabbedElement == this.elements[i],
|
this.elements[i].buildCairo(cr, { showElementBounds: this.grabbedElement && this.grabbedElement == this.elements[i],
|
||||||
drawTextRectangle: this.grabPoint ? true : false });
|
drawElementBounds: this.grabPoint ? true : false });
|
||||||
|
|
||||||
if (this.grabPoint)
|
if (this.grabPoint)
|
||||||
this._searchElementToGrab(cr, this.elements[i]);
|
this._searchElementToGrab(cr, this.elements[i]);
|
||||||
|
|
@ -336,7 +336,7 @@ var DrawingArea = new Lang.Class({
|
||||||
|
|
||||||
if (this.currentElement && this.currentElement.eraser) {
|
if (this.currentElement && this.currentElement.eraser) {
|
||||||
this.currentElement.buildCairo(cr, { showTextCursor: this.textHasCursor,
|
this.currentElement.buildCairo(cr, { showTextCursor: this.textHasCursor,
|
||||||
showTextRectangle: this.currentElement.shape != Shape.TEXT || !this.isWriting,
|
showElementBounds: this.currentElement.shape != Shape.TEXT || !this.isWriting,
|
||||||
dummyStroke: this.currentElement.fill && this.currentElement.line.lineWidth == 0 });
|
dummyStroke: this.currentElement.fill && this.currentElement.line.lineWidth == 0 });
|
||||||
cr.stroke();
|
cr.stroke();
|
||||||
}
|
}
|
||||||
|
|
@ -347,7 +347,7 @@ var DrawingArea = new Lang.Class({
|
||||||
return;
|
return;
|
||||||
|
|
||||||
this.currentElement.buildCairo(cr, { showTextCursor: this.textHasCursor,
|
this.currentElement.buildCairo(cr, { showTextCursor: this.textHasCursor,
|
||||||
showTextRectangle: this.currentElement.shape != Shape.TEXT || !this.isWriting,
|
showElementBounds: this.currentElement.shape != Shape.TEXT || !this.isWriting,
|
||||||
dummyStroke: this.currentElement.fill && this.currentElement.line.lineWidth == 0 });
|
dummyStroke: this.currentElement.fill && this.currentElement.line.lineWidth == 0 });
|
||||||
cr.stroke();
|
cr.stroke();
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -809,11 +809,11 @@ const TextElement = new Lang.Class({
|
||||||
cr.fill();
|
cr.fill();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (params.showTextRectangle) {
|
if (params.showElementBounds) {
|
||||||
cr.rectangle(this.x, this.y - this.height,
|
cr.rectangle(this.x, this.y - this.height,
|
||||||
this.textWidth, this.height * layout.get_line_count());
|
this.textWidth, this.height * layout.get_line_count());
|
||||||
setDummyStroke(cr);
|
setDummyStroke(cr);
|
||||||
} else if (params.drawTextRectangle) {
|
} else if (params.drawElementBounds) {
|
||||||
cr.rectangle(this.x, this.y - this.height,
|
cr.rectangle(this.x, this.y - this.height,
|
||||||
this.textWidth, this.height * layout.get_line_count());
|
this.textWidth, this.height * layout.get_line_count());
|
||||||
// Only draw the rectangle to find the element, not to show it.
|
// Only draw the rectangle to find the element, not to show it.
|
||||||
|
|
@ -937,10 +937,10 @@ const ImageElement = new Lang.Class({
|
||||||
cr.fill();
|
cr.fill();
|
||||||
cr.restore();
|
cr.restore();
|
||||||
|
|
||||||
if (params.showTextRectangle) {
|
if (params.showElementBounds) {
|
||||||
cr.rectangle(x, y, width, height);
|
cr.rectangle(x, y, width, height);
|
||||||
setDummyStroke(cr);
|
setDummyStroke(cr);
|
||||||
} else if (params.drawTextRectangle) {
|
} else if (params.drawElementBounds) {
|
||||||
cr.rectangle(x, y, width, height);
|
cr.rectangle(x, y, width, height);
|
||||||
// Only draw the rectangle to find the element, not to show it.
|
// Only draw the rectangle to find the element, not to show it.
|
||||||
cr.setLineWidth(0);
|
cr.setLineWidth(0);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue