mirror of
https://github.com/sbrow/ps.git
synced 2025-12-29 18:47:38 -05:00
Actually Fixed this time
This commit is contained in:
@@ -110,8 +110,9 @@ function layers(lyrs) {
|
||||
lyr.bounds[3] + ']], "Visible": ' + lyr.visible+', "TextItem": ').replace(/ px/g, "");
|
||||
if (lyr.kind == LayerKind.TEXT) {
|
||||
str += ('{"Contents": "'+lyr.textItem.contents+'",').replace(/\r/g, '\\r');
|
||||
var size = Number((lyr.textItem.size).replace(/ p[tx]/g, ''));
|
||||
if (lyr.textItem.size.includes("px")) {
|
||||
var Ssize = String(lyr.textItem.size);
|
||||
var size = Number(Ssize.replace(/ p[tx]/g, ''));
|
||||
if (Ssize.indexOf("px") != -1) {
|
||||
size = (size / app.activeDocument.resolution) * 72;
|
||||
}
|
||||
str += ' "Size": '+size+',';
|
||||
|
||||
Reference in New Issue
Block a user