mirror of
https://github.com/logsol/chuck.js.git
synced 2026-05-11 10:37:34 +00:00
fixes the fullscreen zoom bug
This commit is contained in:
parent
1a6d8effad
commit
a5c1c05bb4
2 changed files with 16 additions and 24 deletions
|
|
@ -248,8 +248,8 @@ function (Parent, DomController, PIXI, ColorRangeReplaceFilter, Settings, Nc, Ex
|
|||
|
||||
if(isFullScreen) {
|
||||
this.renderer.resize(window.innerWidth, window.innerHeight);
|
||||
this.currentZoom = window.innerWidth / Settings.STAGE_WIDTH;
|
||||
console.log();
|
||||
this.currentZoom = window.innerWidth / 600;
|
||||
console.log(this.currentZoom);
|
||||
} else {
|
||||
this.renderer.resize(600, 400);
|
||||
this.currentZoom = 1;
|
||||
|
|
@ -269,17 +269,6 @@ function (Parent, DomController, PIXI, ColorRangeReplaceFilter, Settings, Nc, Ex
|
|||
grayFilter.gray = 0.85;
|
||||
this.infoFilters = [blurFilter, grayFilter];
|
||||
|
||||
/*
|
||||
var colorFilter = new ColorMatrixFilter()
|
||||
colorFilter.matrix = [
|
||||
1,1,0,0,
|
||||
0,1,0,0,
|
||||
0,0,1,0,
|
||||
0,0,0,1
|
||||
];
|
||||
this.infoFilters = [colorFilter];
|
||||
*/
|
||||
|
||||
this.infoText = new PIXI.Text("", {font: "normal 20px monospace", fill: "red", align: "center"});
|
||||
this.infoBox = new PIXI.Graphics();
|
||||
this.infoBox.alpha = 0.7;
|
||||
|
|
@ -310,7 +299,7 @@ function (Parent, DomController, PIXI, ColorRangeReplaceFilter, Settings, Nc, Ex
|
|||
this.infoBox.position.x = this.infoText.position.x + borderWidth/2 - padding * 2;
|
||||
this.infoBox.position.y = this.infoText.position.y + borderWidth/2 - padding;
|
||||
|
||||
this.infoContainer.visible = false;
|
||||
this.infoContainer.visible = true;
|
||||
this.container.filters = this.infoFilters;
|
||||
this.infoFilters.forEach(function(filter) { filter.dirty = true; });
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue