Skip to content
Permalink
Browse files

v3.0.1

  • Loading branch information
canisminor1990 committed Mar 7, 2018
1 parent 4822201 commit 94a85b983010b67e9c16d8c654013d5ebcdc1733
@@ -1,4 +1,4 @@
**/node_modules/**
**/plugin.sketchplugin/**
**/SketchSelect.sketchplugin/**
**/dist/**
**/test/**
@@ -15,7 +15,7 @@ Make it much more convenient to select layers with similar attributes
### Direct download

1. [Download the ZIP file](https://github.com/canisminor1990/sketch-select/archive/master.zip) and unzip
2. Open the `plugin.sketchplugin`
2. Open the `SketchSelect.sketchplugin`

### Install with Sketchpacks

@@ -13,7 +13,7 @@
### 直接下载

1. [下载 ZIP 包](https://github.com/canisminor1990/sketch-select/archive/master.zip) 并解压
2. 打开 `plugin.sketchplugin` 即可安装
2. 打开 `SketchSelect.sketchplugin` 即可安装

### 使用 Sketchpacks 安装

Large diffs are not rendered by default.

@@ -23,7 +23,7 @@
"skpm": {
"name": "sketch-select",
"manifest": "src/manifest.json",
"main": "plugin.sketchplugin",
"main": "SketchSelect.sketchplugin",
"assets": [
"dist/**/*"
]
@@ -31,13 +31,15 @@ export default (page, opt = {}) => {

mapLayers(page.layers);

const Props = {
Name: ['name', 'id'],
Rect: ['x', 'y', 'width', 'height'],
Prototyping: ['text', 'alignment', 'lineSpacing', 'fixedWidth'],
Style: ['fillColor', 'fillType', 'borderColor', 'borderThickness'],
Symbol: ['symbolId'],
};
/*
const Props = {
Name: ['name', 'id'],
Rect: ['x', 'y', 'width', 'height'],
Prototyping: ['text', 'alignment', 'lineSpacing', 'fixedWidth'],
Style: ['fillColor', 'fillType', 'borderColor', 'borderThickness'],
Symbol: ['symbolId'],
};
*/

_.forEach(All, layer => {
let save = true;
@@ -63,7 +65,16 @@ export default (page, opt = {}) => {

if (save && opt.config.Prototyping) {
_.forEach(opt.config.Prototyping, (value, key) => {
if (layer[key] && layer[key] !== value) save = false;
if (key === 'text') {
if (opt.config.Prototyping.textReg) {
const reg = new RegExp(value);
if (!reg.test(layer.text)) save = false;
} else {
if (layer.text !== value) save = false;
}
} else {
if (layer[key] && layer[key] !== value) save = false;
}
});
}

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit 94a85b9

Please sign in to comment.
You can’t perform that action at this time.