|
@@ -22,6 +22,7 @@ interface AnimationInstruction {
|
|
module Elements.AnimationHandler {
|
|
module Elements.AnimationHandler {
|
|
var container = document.getElementById("sceneAnimation");
|
|
var container = document.getElementById("sceneAnimation");
|
|
var stop = true;
|
|
var stop = true;
|
|
|
|
+ var originalSpriteSize = 200; // TODO: If ever get an actual artist, increase original sprite size to whatever new art goes for.
|
|
export var animations : Array<AnimationLayer> = [];
|
|
export var animations : Array<AnimationLayer> = [];
|
|
export var animationSpeed = 1500; // how long to complete in ms
|
|
export var animationSpeed = 1500; // how long to complete in ms
|
|
export var lastTime = 0;
|
|
export var lastTime = 0;
|
|
@@ -71,17 +72,21 @@ module Elements.AnimationHandler {
|
|
|
|
|
|
function fixVerticalPosition () {
|
|
function fixVerticalPosition () {
|
|
let availHeight = getSize(true);
|
|
let availHeight = getSize(true);
|
|
- container.style.marginBottom = (availHeight - 200) + "px";
|
|
|
|
|
|
+ //container.style.marginBottom = (availHeight - 200) + "px";
|
|
|
|
+ container.style.transform = "scale(" + availHeight / originalSpriteSize + ")";
|
|
|
|
+ container.style.bottom = (availHeight - originalSpriteSize) / 2 + "px";
|
|
|
|
+ container.style.width = originalSpriteSize + "px";
|
|
|
|
+ container.style.height = originalSpriteSize + "px";
|
|
}
|
|
}
|
|
|
|
|
|
export function getSize (fixMin = true) {
|
|
export function getSize (fixMin = true) {
|
|
- let tab = document.getElementById("turnContainer");
|
|
|
|
- let tab1 = document.getElementById("roomName");
|
|
|
|
- tab1.style.marginTop = "";
|
|
|
|
|
|
+ let tab = document.getElementById("currentTurn");
|
|
|
|
+ //let tab1 = document.getElementById("roomName");
|
|
|
|
+ //tab1.style.marginTop = "";
|
|
let height = window.innerHeight - tab.clientHeight;
|
|
let height = window.innerHeight - tab.clientHeight;
|
|
- if (fixMin && height < 200) {
|
|
|
|
- tab1.style.marginTop = (200 - height) + "px";
|
|
|
|
- height = 200;
|
|
|
|
|
|
+ if (fixMin && height < originalSpriteSize) {
|
|
|
|
+ //tab1.style.marginTop = (200 - height) + "px";
|
|
|
|
+ //height = 200;
|
|
}
|
|
}
|
|
return height;
|
|
return height;
|
|
}
|
|
}
|