pixi-multistyle-text
Advanced tools
Comparing version
@@ -5,2 +5,17 @@ # Change Log | ||
<a name="0.6.0"></a> | ||
# [0.6.0](https://github.com/tleunen/pixi-multistyle-text/compare/v0.5.4...v0.6.0) (2017-07-17) | ||
### Feat | ||
* Add more valign options and a debug mode ([#51](https://github.com/tleunen/pixi-multistyle-text/issues/51)) ([49c9326](https://github.com/tleunen/pixi-multistyle-text/commit/49c9326)), closes [#41](https://github.com/tleunen/pixi-multistyle-text/issues/41) [#48](https://github.com/tleunen/pixi-multistyle-text/issues/48) | ||
### BREAKING CHANGES | ||
* The default text style changed from `bottom` to `baseline`. | ||
<a name="0.5.4"></a> | ||
@@ -7,0 +22,0 @@ ## [0.5.4](https://github.com/tleunen/pixi-multistyle-text/compare/v0.5.3...v0.5.4) (2017-06-30) |
/// <reference types="pixi.js" /> | ||
export interface ExtendedTextStyle extends PIXI.TextStyleOptions { | ||
valign?: "top" | "middle" | "bottom"; | ||
valign?: "top" | "middle" | "bottom" | "baseline" | number; | ||
debug?: boolean; | ||
} | ||
@@ -8,4 +9,20 @@ export interface TextStyleSet { | ||
} | ||
export interface MstDebugOptions { | ||
spans: { | ||
enabled?: boolean; | ||
baseline?: string; | ||
top?: string; | ||
bottom?: string; | ||
bounding?: string; | ||
text?: boolean; | ||
}; | ||
objects: { | ||
enabled?: boolean; | ||
bounding?: string; | ||
text?: boolean; | ||
}; | ||
} | ||
export default class MultiStyleText extends PIXI.Text { | ||
private static DEFAULT_TAG_STYLE; | ||
static debugOptions: MstDebugOptions; | ||
private textStyles; | ||
@@ -18,3 +35,3 @@ constructor(text: string, styles: TextStyleSet); | ||
private getFontString(style); | ||
private createTextData(text, style); | ||
private createTextData(text, style, tagName); | ||
private getDropShadowPadding(); | ||
@@ -21,0 +38,0 @@ updateText(): void; |
{ | ||
"name": "pixi-multistyle-text", | ||
"version": "0.5.4", | ||
"version": "0.6.0", | ||
"description": "Multi-Style Text for pixi.js", | ||
@@ -5,0 +5,0 @@ "main": "dist/pixi-multistyle-text.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
125752
27.98%840
29.23%