Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
psd-parse-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
劳工
psd-parse-web
Commits
4f2a5c38
Commit
4f2a5c38
authored
Apr 23, 2020
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改默认值
parent
05b0ebd5
Changes
7
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
11 deletions
+27
-11
index.es.js
dist/index.es.js
+6
-2
index.es.js.map
dist/index.es.js.map
+1
-1
index.js
dist/index.js
+6
-2
index.js.map
dist/index.js.map
+1
-1
index.umd.js
dist/index.umd.js
+6
-2
index.umd.js.map
dist/index.umd.js.map
+1
-1
zeroing.js
src/zeroing.js
+6
-2
No files found.
dist/index.es.js
View file @
4f2a5c38
...
@@ -91,7 +91,7 @@ async function execute(psdFile, options) {
...
@@ -91,7 +91,7 @@ async function execute(psdFile, options) {
await
walkNode
(
tree
,
async
function
(
node
,
parent
)
{
await
walkNode
(
tree
,
async
function
(
node
,
parent
)
{
let
{
name
}
=
node
;
let
{
name
}
=
node
;
const
{
x
,
y
,
width
,
height
,
alpha
,
visible
,
origin
:
{
layer
,
layer
:
{
typeTool
,
solidColor
}}}
=
node
;
const
{
x
,
y
,
width
,
height
,
alpha
,
visible
,
origin
:
{
layer
,
layer
:
{
typeTool
,
solidColor
}}}
=
node
;
console
.
log
(
'walk node:'
,
name
);
//
console.log('walk node:', name);
let
properties
=
{
let
properties
=
{
width
,
height
,
alpha
,
visible
,
width
,
height
,
alpha
,
visible
,
};
};
...
@@ -108,7 +108,11 @@ async function execute(psdFile, options) {
...
@@ -108,7 +108,11 @@ async function execute(psdFile, options) {
let
prefix
=
item
[
0
];
let
prefix
=
item
[
0
];
let
field
=
relativePosPrefixMap
[
prefix
];
let
field
=
relativePosPrefixMap
[
prefix
];
if
(
field
)
{
if
(
field
)
{
properties
[
field
]
=
parseFloat
(
item
.
substr
(
1
));
let
value
=
parseFloat
(
item
.
substr
(
1
));
if
(
isNaN
(
value
)){
value
=
0
;
}
properties
[
field
]
=
value
;
}
}
}
}
}
}
...
...
dist/index.es.js.map
View file @
4f2a5c38
This diff is collapsed.
Click to expand it.
dist/index.js
View file @
4f2a5c38
...
@@ -97,7 +97,7 @@ async function execute(psdFile, options) {
...
@@ -97,7 +97,7 @@ async function execute(psdFile, options) {
await
walkNode
(
tree
,
async
function
(
node
,
parent
)
{
await
walkNode
(
tree
,
async
function
(
node
,
parent
)
{
let
{
name
}
=
node
;
let
{
name
}
=
node
;
const
{
x
,
y
,
width
,
height
,
alpha
,
visible
,
origin
:
{
layer
,
layer
:
{
typeTool
,
solidColor
}}}
=
node
;
const
{
x
,
y
,
width
,
height
,
alpha
,
visible
,
origin
:
{
layer
,
layer
:
{
typeTool
,
solidColor
}}}
=
node
;
console
.
log
(
'walk node:'
,
name
);
//
console.log('walk node:', name);
let
properties
=
{
let
properties
=
{
width
,
height
,
alpha
,
visible
,
width
,
height
,
alpha
,
visible
,
};
};
...
@@ -114,7 +114,11 @@ async function execute(psdFile, options) {
...
@@ -114,7 +114,11 @@ async function execute(psdFile, options) {
let
prefix
=
item
[
0
];
let
prefix
=
item
[
0
];
let
field
=
relativePosPrefixMap
[
prefix
];
let
field
=
relativePosPrefixMap
[
prefix
];
if
(
field
)
{
if
(
field
)
{
properties
[
field
]
=
parseFloat
(
item
.
substr
(
1
));
let
value
=
parseFloat
(
item
.
substr
(
1
));
if
(
isNaN
(
value
)){
value
=
0
;
}
properties
[
field
]
=
value
;
}
}
}
}
}
}
...
...
dist/index.js.map
View file @
4f2a5c38
This diff is collapsed.
Click to expand it.
dist/index.umd.js
View file @
4f2a5c38
...
@@ -97,7 +97,7 @@
...
@@ -97,7 +97,7 @@
await
walkNode
(
tree
,
async
function
(
node
,
parent
)
{
await
walkNode
(
tree
,
async
function
(
node
,
parent
)
{
let
{
name
}
=
node
;
let
{
name
}
=
node
;
const
{
x
,
y
,
width
,
height
,
alpha
,
visible
,
origin
:
{
layer
,
layer
:
{
typeTool
,
solidColor
}}}
=
node
;
const
{
x
,
y
,
width
,
height
,
alpha
,
visible
,
origin
:
{
layer
,
layer
:
{
typeTool
,
solidColor
}}}
=
node
;
console
.
log
(
'walk node:'
,
name
);
//
console.log('walk node:', name);
let
properties
=
{
let
properties
=
{
width
,
height
,
alpha
,
visible
,
width
,
height
,
alpha
,
visible
,
};
};
...
@@ -114,7 +114,11 @@
...
@@ -114,7 +114,11 @@
let
prefix
=
item
[
0
];
let
prefix
=
item
[
0
];
let
field
=
relativePosPrefixMap
[
prefix
];
let
field
=
relativePosPrefixMap
[
prefix
];
if
(
field
)
{
if
(
field
)
{
properties
[
field
]
=
parseFloat
(
item
.
substr
(
1
));
let
value
=
parseFloat
(
item
.
substr
(
1
));
if
(
isNaN
(
value
)){
value
=
0
;
}
properties
[
field
]
=
value
;
}
}
}
}
}
}
...
...
dist/index.umd.js.map
View file @
4f2a5c38
This diff is collapsed.
Click to expand it.
src/zeroing.js
View file @
4f2a5c38
...
@@ -38,7 +38,7 @@ export async function execute(psdFile, options) {
...
@@ -38,7 +38,7 @@ export async function execute(psdFile, options) {
await
walkNode
(
tree
,
async
function
(
node
,
parent
)
{
await
walkNode
(
tree
,
async
function
(
node
,
parent
)
{
let
{
name
}
=
node
;
let
{
name
}
=
node
;
const
{
x
,
y
,
width
,
height
,
alpha
,
visible
,
origin
:
{
layer
,
layer
:
{
typeTool
,
solidColor
}}}
=
node
;
const
{
x
,
y
,
width
,
height
,
alpha
,
visible
,
origin
:
{
layer
,
layer
:
{
typeTool
,
solidColor
}}}
=
node
;
console
.
log
(
'walk node:'
,
name
);
//
console.log('walk node:', name);
let
properties
=
{
let
properties
=
{
width
,
height
,
alpha
,
visible
,
width
,
height
,
alpha
,
visible
,
};
};
...
@@ -55,7 +55,11 @@ export async function execute(psdFile, options) {
...
@@ -55,7 +55,11 @@ export async function execute(psdFile, options) {
let
prefix
=
item
[
0
];
let
prefix
=
item
[
0
];
let
field
=
relativePosPrefixMap
[
prefix
];
let
field
=
relativePosPrefixMap
[
prefix
];
if
(
field
)
{
if
(
field
)
{
properties
[
field
]
=
parseFloat
(
item
.
substr
(
1
));
let
value
=
parseFloat
(
item
.
substr
(
1
));
if
(
isNaN
(
value
)){
value
=
0
;
}
properties
[
field
]
=
value
;
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment