Skip to content

Commit 75843f6

Browse files
committed
Look for window reference
1 parent 380d8be commit 75843f6

File tree

1 file changed

+19
-7
lines changed

1 file changed

+19
-7
lines changed

src/dspf.js

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,8 @@ class RecordInfo {
273273
};
274274

275275
this.isWindow = false;
276+
/** @type {string} */
277+
this.windowReference = undefined;
276278
this.windowSize = {
277279
y: 0,
278280
x: 0,
@@ -297,13 +299,23 @@ class RecordInfo {
297299
case "WINDOW":
298300
this.isWindow = true;
299301
let points = keyword.value.split(' ');
300-
//WINDOW (STARTY STARTX SIZEY SIZEX)
301-
this.windowSize = {
302-
y: Number(points[0]),
303-
x: Number(points[1]),
304-
width: Number(points[3]),
305-
height: Number(points[2])
306-
};
302+
303+
switch (points.length) {
304+
case 4:
305+
//WINDOW (STARTY STARTX SIZEY SIZEX)
306+
this.windowSize = {
307+
y: Number(points[0]),
308+
x: Number(points[1]),
309+
width: Number(points[3]),
310+
height: Number(points[2])
311+
};
312+
break;
313+
case 1:
314+
//WINDOW (REF)
315+
this.windowReference = points[0];
316+
break;
317+
}
318+
307319
break;
308320
}
309321
});

0 commit comments

Comments
 (0)