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

feat!: parse layer hidden, transparency lock flags #34

Merged
merged 1 commit into from
Jun 20, 2022

Conversation

pastelmind
Copy link
Collaborator

@pastelmind pastelmind commented Jun 20, 2022

This fixes #11

  • Add layer.isHidden and layer.isTransparencyLocked flags
    (isHidden was previously visible, and was not exposed via TypeScript)
const psd = Psd.parse(/* */)
psd.layers[0].isHidden // boolean
psd.layers[0].isTransparencyLocked // boolean

Note that "transparency locked" does not equate "layer is locked". A fully locked layer always has transparency lock set, but not vice versa.

  • Improve logic for parsing layer flags (use bitwise OR, not toString)
  • Fix bug where the 'hidden' flag (previously 'visible') was being parsed incorrectly
  • Add test cases for the new flags (and update fixture)

@pastelmind pastelmind added type: bug Something isn't working type: enhancement New feature or request labels Jun 20, 2022
@pastelmind pastelmind self-assigned this Jun 20, 2022
- Add `layer.isHidden` and `layer.isTransparencyLocked` flags
  (`isHidden` was previously `visible`, and was not exposed via
  TypeScript)
- Improve logic for parsing layer flags (use bitwise OR, not toString)
- Fix bug where the `isHidden` flag (previously `visible`) was being
  parsed incorrectly
- Add test cases for the new flags (and update fixture)
@pastelmind pastelmind merged commit 1caf69b into main Jun 20, 2022
@pastelmind pastelmind deleted the feat-layer-flags branch June 20, 2022 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working type: enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

visible always true ?
2 participants