Add viewedRectangle global variable.

Signed-off-by: Gökay ŞATIR <gokaysatir@gmail.com>
Change-Id: Id0f2afe8cc750d867a33dada7134f7b7d93a11c3
This commit is contained in:
Gökay ŞATIR 2021-07-31 13:18:56 +03:00
parent 60c2c3091b
commit 87b98a4b59
2 changed files with 3 additions and 0 deletions

View file

@ -14,6 +14,7 @@ window.app = { // Shouldn't have any functions defined.
pixels: [0, 0], // This can change according to the zoom level and document's size.
twips: [0, 0]
},
viewedRectangle: [0, 0, 0, 0], // Visible part of the file (x, y, w, h).
fileBasedView: false, // (draw-impress only) Default is false. For read-only documents, user can view all parts at once. In that case, this variable is set to "true".
calc: {
cellCursor: {

View file

@ -583,6 +583,8 @@ class CanvasSectionContainer {
this.documentBottomRight[0] = Math.round(points[2]);
this.documentBottomRight[1] = Math.round(points[3]);
app.file.viewedRectangle = [this.documentTopLeft[0], this.documentTopLeft[1], this.documentBottomRight[0] - this.documentTopLeft[0], this.documentBottomRight[1] - this.documentTopLeft[1]];
for (var i: number = 0; i < this.sections.length; i++) {
var section: CanvasSectionObject = this.sections[i];