File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " text-cache" ,
3
- "version" : " 4.0 .0" ,
3
+ "version" : " 4.1 .0" ,
4
4
"description" : " Internal module - vectorized text pooling for gl-vis" ,
5
5
"main" : " textcache.js" ,
6
6
"directories" : {
Original file line number Diff line number Diff line change @@ -29,7 +29,8 @@ function unwrap(mesh) {
29
29
}
30
30
}
31
31
32
- function textGet ( font , text ) {
32
+ function textGet ( font , text , opts ) {
33
+ var opts = opts || { }
33
34
var fontcache = __TEXT_CACHE [ font ]
34
35
if ( ! fontcache ) {
35
36
fontcache = __TEXT_CACHE [ font ] = {
@@ -45,7 +46,7 @@ function textGet(font, text) {
45
46
mesh = fontcache [ text ] = unwrap ( vectorizeText ( text , {
46
47
triangles : true ,
47
48
font : font ,
48
- textAlign : 'left' ,
49
+ textAlign : opts . textAlign || 'left' ,
49
50
textBaseline : 'alphabetic'
50
51
} ) )
51
52
} else {
You can’t perform that action at this time.
0 commit comments