Commit 4407bce1 authored by wangjianfeng.yz's avatar wangjianfeng.yz

2.0.47

parent 2523b4d3
declare namespace FYGE{export const VERSION = "2.0.46";
declare namespace FYGE{export const VERSION = "2.0.47";
export function cos(angle: number): number;
......@@ -44,7 +44,9 @@ export enum TEXT_ALIGN {
export enum VERTICAL_ALIGN {
MIDDLE = "middle",
UP = "up",
DOWN = "down"
DOWN = "down",
TOP = "top",
BOTTOM = "bottom"
}
export enum TEXT_lINETYPE {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
export const VERSION = "2.0.46";
export const VERSION = "2.0.47";
export function cos(angle: number): number;
......@@ -44,7 +44,9 @@ export enum TEXT_ALIGN {
export enum VERTICAL_ALIGN {
MIDDLE = "middle",
UP = "up",
DOWN = "down"
DOWN = "down",
TOP = "top",
BOTTOM = "bottom"
}
export enum TEXT_lINETYPE {
......
{
"name": "fyge",
"version": "2.0.46",
"version": "2.0.47",
"description": "canvas渲染引擎",
"main": "./build/fyge.min.js",
"module": "./build/fyge.esm.js",
......
......@@ -472,6 +472,9 @@
2.0.46 Loader的loadRawWeb方法修改,去掉原先的onerror,onreadystatechange里判断改成readyState为4下,2XX或304为成功,其余状态失败
2.0.47 const的VERTICAL_ALIGN新增枚举TOP和BOTTOM,相应修改文件BitmapText和TextField
外层canvas标签的transform数据在获取鼠标坐标时并未考虑,比如旋转
......
......@@ -7,7 +7,7 @@
* @name VERSION
* @type {string}
*/
export const VERSION = "2.0.46";
export const VERSION = "2.0.47";
/**
......@@ -188,6 +188,8 @@ export enum VERTICAL_ALIGN {
MIDDLE = "middle",
UP = "up",
DOWN = "down",
TOP = "top",
BOTTOM = "bottom",
}
/**
......
......@@ -151,7 +151,7 @@ export class BitmapText extends Container {
// }
// for (var i = 0; i < this.children.length; i++)this.children[i].y = up;
var up: number = 0;
if (this._verticalAlign == VERTICAL_ALIGN.DOWN) {
if (this._verticalAlign == VERTICAL_ALIGN.DOWN || this._verticalAlign == VERTICAL_ALIGN.BOTTOM) {
up = -1;
} else if (this._verticalAlign == VERTICAL_ALIGN.MIDDLE) {
up = -1 / 2;
......
......@@ -619,7 +619,7 @@ export class TextField extends Sprite {
//跟trueHeight比较
if (s._verticalAlign == VERTICAL_ALIGN.MIDDLE) {
upY = (s._textHeight - trueHeight) * 0.5;
} else if (s._verticalAlign == VERTICAL_ALIGN.DOWN) {
} else if (s._verticalAlign == VERTICAL_ALIGN.DOWN || s._verticalAlign == VERTICAL_ALIGN.BOTTOM) {
upY = s._textHeight - trueHeight;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment