From f997bc33e92602eedec631ce34b9800f523cd734 Mon Sep 17 00:00:00 2001 From: echo Date: Fri, 15 Dec 2017 15:42:13 +0800 Subject: [PATCH] fix floormsg css --- libs/core.js | 20 +++++++++++++++----- styles.css | 8 ++++---- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/libs/core.js b/libs/core.js index 6b5313f5..10e25b92 100644 --- a/libs/core.js +++ b/libs/core.js @@ -2791,7 +2791,7 @@ core.prototype.resize = function(clientWidth, clientHeight) { } // 各元素大小的变量声明 var gameGroupWidth, gameGroupHeight, borderRight, - canvasWidth, canvasTop, canvasLeft, + canvasWidth, canvasTop, // canvasLeft, statusBarWidth, statusBarHeight, statusBarBorder, statusWidth, statusHeight, statusMaxWidth,statusLabelsLH, toolBarWidth, toolBarHeight, toolBarTop, toolBarBorder, @@ -2835,7 +2835,7 @@ core.prototype.resize = function(clientWidth, clientHeight) { gameGroupWidth = width canvasTop = tempTopBarH; - canvasLeft = 0; + // canvasLeft = 0; toolBarWidth = statusBarWidth = width; statusBarHeight = tempTopBarH; //一共有3行加上两个padding空隙 statusBarBorder = '3px #fff solid'; @@ -2859,7 +2859,7 @@ core.prototype.resize = function(clientWidth, clientHeight) { gameGroupWidth = width + DEFAULT_BAR_WIDTH * scale; gameGroupHeight = width; canvasTop = 0; - canvasLeft = DEFAULT_BAR_WIDTH * scale; + // canvasLeft = DEFAULT_BAR_WIDTH * scale; toolBarWidth = statusBarWidth = DEFAULT_BAR_WIDTH * scale; statusBarHeight = scale * statusLineHeight * count + SPACE * 2; //一共有9行加上两个padding空隙 statusBarBorder = '3px #fff solid'; @@ -2887,7 +2887,7 @@ core.prototype.resize = function(clientWidth, clientHeight) { gameGroupHeight = DEFAULT_CANVAS_WIDTH; canvasWidth = DEFAULT_CANVAS_WIDTH; canvasTop = 0; - canvasLeft = DEFAULT_BAR_WIDTH; + // canvasLeft = DEFAULT_BAR_WIDTH; toolBarWidth = statusBarWidth = DEFAULT_BAR_WIDTH; statusBarHeight = statusLineHeight * count + SPACE * 2; //一共有9行 @@ -2923,11 +2923,21 @@ core.prototype.resize = function(clientWidth, clientHeight) { width: canvasWidth + unit, height: canvasWidth + unit, top: canvasTop + unit, - left: canvasLeft + unit, + right: 0, + // left: canvasLeft + unit, border: '3px #fff solid', } }, + { + id: 'floorMsgGroup', + rules:{ + width: canvasWidth + unit, + height: canvasWidth + unit, + top: 0, + right: 0, + } + }, { id: 'statusBar', rules:{ diff --git a/styles.css b/styles.css index 24e606c1..1b2dd7a2 100644 --- a/styles.css +++ b/styles.css @@ -138,11 +138,11 @@ html, body { } #floorMsgGroup { - width: 100%; - height: 100%; + /* width: 100%; + height: 100%; */ + /* top: 0; + right: 0; */ position: absolute; - top: 0; - right: 0; text-align: center; display: none; color: #fff;