Skip to content

Commit

Permalink
v1.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
YufanYang committed Dec 18, 2018
1 parent 7ad5344 commit 45dde98
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 7 deletions.
1 change: 0 additions & 1 deletion Anto.sketchplugin/Contents/Resources/index.11d79da1.css

This file was deleted.

1 change: 0 additions & 1 deletion Anto.sketchplugin/Contents/Resources/index.298f9ae3.js

This file was deleted.

1 change: 1 addition & 0 deletions Anto.sketchplugin/Contents/Resources/index.312630e4.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions Anto.sketchplugin/Contents/Resources/index.6af6c9cb.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Anto.sketchplugin/Contents/Resources/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<meta name="viewport"
content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<title>ANTO</title>
<link href="index.11d79da1.css" rel="stylesheet"></head>
<link href="index.6af6c9cb.css" rel="stylesheet"></head>
<body>
<div id="root"></div>
<script type="text/javascript" src="index.298f9ae3.js"></script></body>
<script type="text/javascript" src="index.312630e4.js"></script></body>
</html>
Binary file not shown.
2 changes: 1 addition & 1 deletion Anto.sketchplugin/Contents/Sketch/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Anto.sketchplugin/Contents/Sketch/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"AntoPanel"
]
},
"version": "1.1.0",
"version": "1.1.1",
"description": "Sketch tools for AFUX",
"homepage": "https://github.com/canisminor1990/anto",
"disableCocoaScriptPreprocessor": true,
Expand Down
Binary file modified public/sketch/AFUX 交互组件.sketch
Binary file not shown.
8 changes: 7 additions & 1 deletion src/handleSymbol.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,11 @@ export default e => {
const group = instance.detach();
const inner = group.name[0] !== '✱' ? group.duplicate() : group.layers[0];
group.remove();
const image = _.filter(document.getLayersNamed(data.name), l => l.type === 'Image')[0];
let image = _.filter(document.getLayersNamed(data.name), l => l.type === 'Image')[0];
if (!image) {
const selection = document.selectedLayers;
image = _.filter(selection.layers, l => l.type === 'Image')[0];
}
if (image) {
inner.parent = image.parent;
inner.frame.x = image.frame.x;
Expand All @@ -54,6 +58,7 @@ export default e => {
inner.frame.x = group.frame.x;
inner.frame.y = group.frame.y;
}
inner.selected = true;
if (inner.layers) {
_.forEach(inner.layers, l => {
if (l.name === '@Bg') {
Expand All @@ -64,6 +69,7 @@ export default e => {
const innerChild = inner.layers[0];
innerChild.parent = inner.parent;
innerChild.frame = innerChild.frame.changeBasis({ from: inner, to: inner.parent });
innerChild.selected = true;
inner.remove();
}
}
Expand Down

0 comments on commit 45dde98

Please sign in to comment.