-
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #302 from jeffeb3/feature/237-program-code-effect
annotated exports
- Loading branch information
Showing
10 changed files
with
355 additions
and
152 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import Effect from "./Effect" | ||
|
||
const options = { | ||
programCodePre: { | ||
title: "Start code", | ||
type: "textarea", | ||
}, | ||
programCodePost: { | ||
title: "End code", | ||
type: "textarea", | ||
}, | ||
} | ||
|
||
export default class ProgramCode extends Effect { | ||
constructor() { | ||
super("programCode") | ||
this.label = "Program code" | ||
this.description = | ||
"When exporting the pattern to a file, the provided program code is added before and/or after this layer is rendered." | ||
} | ||
|
||
canChangeSize(state) { | ||
return false | ||
} | ||
|
||
canRotate(state) { | ||
return false | ||
} | ||
|
||
canMove(state) { | ||
return false | ||
} | ||
|
||
getInitialState() { | ||
return { | ||
...super.getInitialState(), | ||
...{ | ||
programCodePre: "", | ||
programCodePost: "", | ||
}, | ||
} | ||
} | ||
|
||
getVertices(effect, layer, vertices) { | ||
return vertices | ||
} | ||
|
||
getOptions() { | ||
return options | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.