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++) {
|
||||
cr.save();
|
||||
|
||||
this.elements[i].buildCairo(cr, { showTextRectangle: this.grabbedElement && this.grabbedElement == this.elements[i],
|
||||
drawTextRectangle: this.grabPoint ? true : false });
|
||||
this.elements[i].buildCairo(cr, { showElementBounds: this.grabbedElement && this.grabbedElement == this.elements[i],
|
||||
drawElementBounds: this.grabPoint ? true : false });
|
||||
|
||||
if (this.grabPoint)
|
||||
this._searchElementToGrab(cr, this.elements[i]);
|
||||
|
|
@ -336,7 +336,7 @@ var DrawingArea = new Lang.Class({
|
|||
|
||||
if (this.currentElement && this.currentElement.eraser) {
|
||||
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 });
|
||||
cr.stroke();
|
||||
}
|
||||
|
|
@ -347,7 +347,7 @@ var DrawingArea = new Lang.Class({
|
|||
return;
|
||||
|
||||
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 });
|
||||
cr.stroke();
|
||||
},
|
||||
|
|
|
|||
|
|
@ -809,11 +809,11 @@ const TextElement = new Lang.Class({
|
|||
cr.fill();
|
||||
}
|
||||
|
||||
if (params.showTextRectangle) {
|
||||
if (params.showElementBounds) {
|
||||
cr.rectangle(this.x, this.y - this.height,
|
||||
this.textWidth, this.height * layout.get_line_count());
|
||||
setDummyStroke(cr);
|
||||
} else if (params.drawTextRectangle) {
|
||||
} else if (params.drawElementBounds) {
|
||||
cr.rectangle(this.x, this.y - this.height,
|
||||
this.textWidth, this.height * layout.get_line_count());
|
||||
// Only draw the rectangle to find the element, not to show it.
|
||||
|
|
@ -937,10 +937,10 @@ const ImageElement = new Lang.Class({
|
|||
cr.fill();
|
||||
cr.restore();
|
||||
|
||||
if (params.showTextRectangle) {
|
||||
if (params.showElementBounds) {
|
||||
cr.rectangle(x, y, width, height);
|
||||
setDummyStroke(cr);
|
||||
} else if (params.drawTextRectangle) {
|
||||
} else if (params.drawElementBounds) {
|
||||
cr.rectangle(x, y, width, height);
|
||||
// Only draw the rectangle to find the element, not to show it.
|
||||
cr.setLineWidth(0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue