Skip to content

Commit

Permalink
refactor(sketch-generator): wrap flow control
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Kopco committed May 17, 2021
1 parent 096ca96 commit c3cbc8b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
Binary file modified packages/generator-sketch/sketch/symbol_database.sqlite
Binary file not shown.
9 changes: 6 additions & 3 deletions packages/generator-sketch/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -424,12 +424,15 @@ module.exports = {
var helperMessage = findLayer(symbol, (s) =>
/^div#helper-message/.test(s.name)
);
if (helperMessage)
if (helperMessage) {
helperMessage.resizingConstraint = BOTTOM_LEFT_RIGHT_FIXED_HEIGHT;
if (!helperMessage && info)
}
if (!helperMessage && info) {
info.resizingConstraint = BOTTOM_LEFT_RIGHT_FIXED_HEIGHT;
if (!helperMessage && count)
}
if (!helperMessage && count) {
count.resizingConstraint = BOTTOM_LEFT_RIGHT_FIXED_HEIGHT;
}
var inputValue = findLayer(symbol, (s) => /^Input Value/.test(s.name));
if (inputValue) inputValue.resizingConstraint = TOP_LEFT_FIXED_SIZE;
findLayers(
Expand Down
4 changes: 3 additions & 1 deletion packages/generator-sketch/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,9 @@ const dbFilename = path.resolve(__dirname, `../sketch/symbol_database.sqlite`);
'Fill ' + override.fills.map((b) => `${colorString(b)}`).join(', ');
}
if (override.borders && override.borders.length > 0) {
if (override.fills) styleName += ' / ';
if (override.fills) {
styleName += ' / ';
}
styleName +=
'Border ' +
override.borders
Expand Down

0 comments on commit c3cbc8b

Please sign in to comment.