Skip to content

add parse layer link section#17

Merged
meltingice merged 1 commit intomeltingice:masterfrom
iamgqb:master
Jul 14, 2017
Merged

add parse layer link section#17
meltingice merged 1 commit intomeltingice:masterfrom
iamgqb:master

Conversation

@iamgqb
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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.

3 participants