mirror of
https://github.com/sbrow/ps.git
synced 2025-12-29 18:47:38 -05:00
V2.0 update
## Features ### Open * Now returns the activeDocument after opening the file. ### JSLayer() * Removed semicolon from output. ### Document * Added FullName() which returns path to the .psd file. * Changed Filename() to DumpFile(), as Filename was misleading. * Dump function now saves the file as well, to help reduce the frequency of de-syncs. * Dump function now saves json files alongside the .psds instead of in a separate data folder- encountered issues when using the package as a module in go 1.11beta2. * Added Save() ## Testing * Added TestDocument_Save * Added TestDocument_Dump ## Misc. * Renamed pkgpath to pkgPath, to better fit go's standards. ## Fixes * DoAction now runs correctly.
This commit is contained in:
10
layerset.go
10
layerset.go
@@ -201,8 +201,7 @@ func (l *LayerSet) SetVisible(b bool) error {
|
||||
if l.visible == b {
|
||||
return nil
|
||||
}
|
||||
js := fmt.Sprintf("%s.visible=%v;", strings.TrimRight(
|
||||
JSLayer(l.Path()), ";"), b)
|
||||
js := fmt.Sprintf("%s.visible=%v;", JSLayer(l.Path()), b)
|
||||
if _, err := DoJS("compilejs.jsx", js); err != nil {
|
||||
return err
|
||||
}
|
||||
@@ -297,10 +296,3 @@ func (l *LayerSet) Refresh() error {
|
||||
l.current = true
|
||||
return nil
|
||||
}
|
||||
|
||||
func (l *LayerSet) Set(ll *LayerSet) {
|
||||
if ll == nil {
|
||||
panic("AHHHHHH")
|
||||
}
|
||||
l = ll
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user