linting
This commit is contained in:
parent
16bd59edf0
commit
6c7e7df6da
@ -1790,8 +1790,8 @@ var Font = (function FontClosure() {
|
|||||||
for (var i = 1; i < numGlyphs; i++) {
|
for (var i = 1; i < numGlyphs; i++) {
|
||||||
var cid = gidToCidMap[i] || i;
|
var cid = gidToCidMap[i] || i;
|
||||||
var unicode = this.toFontChar[cid];
|
var unicode = this.toFontChar[cid];
|
||||||
if (!unicode || typeof unicode !== 'number' || isSpecialUnicode(unicode) ||
|
if (!unicode || typeof unicode !== 'number' ||
|
||||||
unicode in usedUnicodes) {
|
isSpecialUnicode(unicode) || unicode in usedUnicodes) {
|
||||||
unassignedUnicodeItems.push(i);
|
unassignedUnicodeItems.push(i);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -1837,7 +1837,8 @@ var Font = (function FontClosure() {
|
|||||||
var usedUnicodes = [], unassignedUnicodeItems = [];
|
var usedUnicodes = [], unassignedUnicodeItems = [];
|
||||||
for (var i = 0, ii = glyphs.length; i < ii; i++) {
|
for (var i = 0, ii = glyphs.length; i < ii; i++) {
|
||||||
var unicode = toFontChar[i + 1];
|
var unicode = toFontChar[i + 1];
|
||||||
if (!unicode || typeof unicode !== 'number' || unicode in usedUnicodes) {
|
if (!unicode || typeof unicode !== 'number' ||
|
||||||
|
unicode in usedUnicodes) {
|
||||||
unassignedUnicodeItems.push(i);
|
unassignedUnicodeItems.push(i);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -1044,9 +1044,9 @@ var TextLayerBuilder = function textLayerBuilder(textLayerDiv) {
|
|||||||
// Adjust div width to match canvas text
|
// Adjust div width to match canvas text
|
||||||
// Due to the .offsetWidth calls, this is slow
|
// Due to the .offsetWidth calls, this is slow
|
||||||
// This needs to come after appending to the DOM
|
// This needs to come after appending to the DOM
|
||||||
CustomStyle.setProp('transform' , textDiv, 'scale('
|
var textScale = textDiv.dataset.canvasWidth / textDiv.offsetWidth;
|
||||||
+ textDiv.dataset.canvasWidth/textDiv.offsetWidth
|
CustomStyle.setProp('transform' , textDiv,
|
||||||
+ ',1)');
|
'scale(' + textScale + ', 1)');
|
||||||
CustomStyle.setProp('transformOrigin' , textDiv, '0% 0%');
|
CustomStyle.setProp('transformOrigin' , textDiv, '0% 0%');
|
||||||
}
|
}
|
||||||
} // textLength > 0
|
} // textLength > 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user