From ad46b4a476ded81808224de6c753c50909e57559 Mon Sep 17 00:00:00 2001 From: mattmcw Date: Thu, 24 Oct 2024 11:41:53 -0400 Subject: [PATCH] Scaling feature is added. Resolves #5 --- dist/display/index.js | 2 -- dist/display/index.js.map | 2 +- dist/sequence/index.js | 41 ++++++++++++++++++++++++++------------ dist/sequence/index.js.map | 2 +- src/display/index.ts | 2 -- src/sequence/index.ts | 41 ++++++++++++++++++++++++++------------ 6 files changed, 58 insertions(+), 32 deletions(-) diff --git a/dist/display/index.js b/dist/display/index.js index 60e50c6..a20ced9 100644 --- a/dist/display/index.js +++ b/dist/display/index.js @@ -32,13 +32,11 @@ class Display { let offset; this.source = new Dimensions(width, height); if (this.source.getRatio() > this.screen.getRatio()) { - console.log('a'); this.display = new Dimensions(this.screen.width, Math.floor(this.screen.width / this.source.getRatio())); offset = this.screen.height - this.display.height; this.offset = { x: 0, y: Math.round(offset / 2) }; } else { - console.log('b'); this.display = new Dimensions(Math.floor(this.source.getRatio() * this.screen.height), this.screen.height); offset = this.screen.width - this.display.width; this.offset = { x: Math.round(offset / 2), y: 0 }; diff --git a/dist/display/index.js.map b/dist/display/index.js.map index 81f9d49..4593078 100644 --- a/dist/display/index.js.map +++ b/dist/display/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/display/index.ts"],"names":[],"mappings":";;;AAEA,MAAa,UAAU;IAItB,YAAa,KAAc,EAAE,MAAe;QAC3C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACtB,CAAC;IAEM,QAAQ;QACd,OAAO,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;IACjC,CAAC;CACD;AAZD,gCAYC;AAOD,MAAa,OAAO;IAQnB,YAAa,KAAc,EAAE,MAAe;QAC3C,IAAI,CAAC,MAAM,GAAG,IAAI,UAAU,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAC5C,I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GAAG,CAAC,CAAA;YAChB,IAAI,CAAC,OAAO,GAAG,IAAI,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;YAC3G,MAAM,GAAG,IAAI,CAAC,MAAM,CAAC,KAAK,GAAG,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;YAChD,IAAI,CAAC,MAAM,GAAG,EAAE,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,EAAG,CAAC,EAAG,CAAC,EAAE,CAAC;QACrD,CAAC;IACF,CAAC;IAEM,mBAAmB;QACzB,OAAO;YACN,CAAC,EAAG,IAAI,CAAC,OAAO,CAAC,KAAK;YACtB,CAAC,EAAG,IAAI,CAAC,OAAO,CAAC,MAAM;YACvB,CAAC,EAAG,IAAI,CAAC,MAAM,CAAC,CAAC;YACjB,CAAC,EAAG,IAAI,CAAC,MAAM,CAAC,CAAC;SACjB,CAAA;IACF,CAAC;IAEM,aAAa;QACnB,OAAO,IAAI,CAAC,OAAO,CAAC;IACrB,CAAC;IAEM,SAAS;QACf,OAAO,IAAI,CAAC,MAAM,CAAC;IACpB,CAAC;IAEM,SAAS;QACf,OAAO,IAAI,CAAC,MAAM,CAAC;IACpB,CAAC;IAEM,SAAS;QACf,OAAO,IAAI,CAAC,MAAM,CAAC;IACpB,CAAC;CACD;AArED,0BAqEC;AAED,MAAM,CAAC,OAAO,GAAG,EAAE,OAAO,EAAG,UAAU,EAAE,CAAC"} \ No newline at end of file +{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/display/index.ts"],"names":[],"mappings":";;;AAEA,MAAa,UAAU;IAItB,YAAa,KAAc,EAAE,MAAe;QAC3C,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAA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d7d1a9..31f011f 100644 --- a/dist/sequence/index.js +++ b/dist/sequence/index.js @@ -291,7 +291,6 @@ class Sequence { const screen = this.display.getScreen(); let totalX; let totalY; - let updated = false; if (x !== 0) { if (current.x + x < 0) { return; @@ -301,7 +300,6 @@ class Sequence { return; } this.display.setOffsetX(current.x + x); - updated = true; } if (y !== 0) { if (current.y + y < 0) { @@ -312,18 +310,14 @@ class Sequence { return; } this.display.setOffsetY(current.y + y); - updated = true; - } - if (updated) { - this.updateClientsOnDisplay(); } + this.updateClientsOnDisplay(); } updateSize(width, height) { const current = this.display.getOutgoingPosition(); const screen = this.display.getScreen(); let totalX; let totalY; - let updated = false; if (width !== 0) { if (current.w + width < 1) { return; @@ -333,7 +327,6 @@ class Sequence { return; } this.display.setWidth(current.w + width); - updated = true; } if (height !== 0) { if (current.h + height < 1) { @@ -344,17 +337,39 @@ class Sequence { return; } this.display.setHeight(current.h + height); - updated = true; - } - if (updated) { - this.updateClientsOnDisplay(); } + this.updateClientsOnDisplay(); } updateScale(scale) { + const source = this.display.getSource(); const current = this.display.getDimensions(); const offset = this.display.getOffset(); const screen = this.display.getScreen(); - console.dir(scale); + let newWidth; + let newHeight; + let newOffsetX; + let newOffsetY; + if (source.getRatio() > screen.getRatio()) { + if (current.width + scale > screen.width || current.width + scale < 1) { + return; + } + newWidth = current.width + scale; + newHeight = Math.floor(newWidth / source.getRatio()); + } + else { + if (current.height + scale > screen.height || current.height + scale < 1) { + return; + } + newHeight = current.height + scale; + newWidth = Math.floor(source.getRatio() * newHeight); + } + newOffsetX = Math.round((screen.width - newWidth) / 2); + newOffsetY = Math.round((screen.height - newHeight) / 2); + this.display.setWidth(newWidth); + this.display.setHeight(newHeight); + this.display.setOffsetX(newOffsetX); + this.display.setOffsetY(newOffsetY); + this.updateClientsOnDisplay(); } async frameRecord() { const start = Date.now(); diff --git a/dist/sequence/index.js.map b/dist/sequence/index.js.map index 970e9bd..f492c49 100644 --- a/dist/sequence/index.js.map +++ b/dist/sequence/index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K,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,eAAe,CAAC;QAC3D,KAAK,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,KAAK,CAAC;QAC3B,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,IAAI,EAAE,eAAe,EAAE,gBAAgB,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;IAC7E,CAAC;CACD;AAlWD,4BAkWC"} \ No newline at end of file diff --git a/src/display/index.ts b/src/display/index.ts index 7f35ca3..b28e667 100644 --- a/src/display/index.ts +++ b/src/display/index.ts @@ -52,12 +52,10 @@ export class Display { let offset : number; this.source = new Dimensions(width, height); if (this.source.getRatio() > this.screen.getRatio()) { - console.log('a'); this.display = new Dimensions(this.screen.width, Math.floor(this.screen.width / this.source.getRatio())); offset = this.screen.height - this.display.height; this.offset = { x: 0, y : Math.round(offset / 2) }; } else { - console.log('b') this.display = new Dimensions(Math.floor(this.source.getRatio() * this.screen.height), this.screen.height); offset = this.screen.width - this.display.width; this.offset = { x: Math.round(offset / 2), y : 0 }; diff --git a/src/sequence/index.ts b/src/sequence/index.ts index 53ec275..c17a1c2 100644 --- a/src/sequence/index.ts +++ b/src/sequence/index.ts @@ -352,7 +352,6 @@ export class Sequence { const screen : Dimensions = this.display.getScreen(); let totalX : number; let totalY : number; - let updated : boolean = false; if (x !== 0) { if (current.x + x < 0) { return; @@ -362,7 +361,6 @@ export class Sequence { return; } this.display.setOffsetX(current.x + x); - updated = true; } if (y !== 0) { if (current.y + y < 0) { @@ -373,11 +371,8 @@ export class Sequence { return; } this.display.setOffsetY(current.y + y); - updated = true; - } - if (updated) { - this.updateClientsOnDisplay(); } + this.updateClientsOnDisplay(); } public updateSize (width : number, height : number) { @@ -385,7 +380,6 @@ export class Sequence { const screen : Dimensions = this.display.getScreen(); let totalX : number; let totalY : number; - let updated : boolean = false; if (width !== 0) { if (current.w + width < 1) { return; @@ -395,7 +389,6 @@ export class Sequence { return; } this.display.setWidth(current.w + width); - updated = true; } if (height !== 0) { if (current.h + height < 1) { @@ -406,18 +399,40 @@ export class Sequence { return; } this.display.setHeight(current.h + height); - updated = true; - } - if (updated) { - this.updateClientsOnDisplay(); } + this.updateClientsOnDisplay(); } public updateScale (scale : number) { + const source : Dimensions = this.display.getSource(); const current : Dimensions = this.display.getDimensions(); const offset : Offset = this.display.getOffset(); const screen : Dimensions = this.display.getScreen(); - console.dir(scale); + let newWidth : number; + let newHeight : number; + let newOffsetX : number; + let newOffsetY : number; + if (source.getRatio() > screen.getRatio()) { + if (current.width + scale > screen.width || current.width + scale < 1) { + return; + } + newWidth = current.width + scale; + newHeight = Math.floor(newWidth / source.getRatio()); + } else { + if (current.height + scale > screen.height || current.height + scale < 1) { + return; + } + newHeight = current.height + scale; + newWidth = Math.floor(source.getRatio() * newHeight); + } + newOffsetX = Math.round((screen.width - newWidth) / 2); + newOffsetY = Math.round((screen.height - newHeight) / 2); + + this.display.setWidth(newWidth); + this.display.setHeight(newHeight); + this.display.setOffsetX(newOffsetX); + this.display.setOffsetY(newOffsetY); + this.updateClientsOnDisplay(); } private async frameRecord () {