Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add parse layer link section #17

Merged
merged 1 commit into from
Jul 14, 2017
Merged

Conversation

iamgqb
Copy link
Contributor

@iamgqb iamgqb commented Nov 14, 2014

add layer link section; layer link represented by array in psd;
for example:
1.

layer3 and layer1 are linked;

then the array is [1, 1, 0]

2 if there are more layer links

layer3 and layer1 are linked; layer4 and layer2 are linked;

then the array is [1, 2, 0, 1, 2]

3 if there are some group layer ,but not linked;

layer3 and layer1 are linked; layer4 and layer2 are linked;

then the array is [ 0, 1, 2, 0, 0, 1, 2 ];

yes, we find group layer create 2 element in the array; here, I call them groupStart and groupEnd;

4 if there are some group layer, and they are linked;

layer3 and layer1 are linked; layer4 and layer2 are linked; folder1 and layer5 are linked;

then the array is [ 3, 1, 2, 0, 3, 1, 2 ]; we find the groupStart is not zero, and the groupEnd also is zero;

Through the above,find:
same linked layers , they have same number, not zero;
group layer has two numbers, and the groupEnd always zero;

OK, through some processing we could get which layer are linked mutually

@meltingice meltingice merged commit af691dd into meltingice:master Jul 14, 2017
@meltingice
Copy link
Owner

This is a great start, thanks! Would be great to add functionality to the Node classes that lets you determine whether 2 nodes are linked without having to work with this array directly, too.

@xielijun
Copy link

xielijun commented Mar 5, 2021

how can i use it in my Browser Example?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants