mirror of
https://gitee.com/onvia/ccc-tnt-psd2ui
synced 2024-12-26 03:38:24 +00:00
修复空组导致 cocos creator 编辑器崩溃
This commit is contained in:
parent
037e598d81
commit
dbef180d51
3
psd2ui-tools/dist/index.js
vendored
3
psd2ui-tools/dist/index.js
vendored
@ -1359,6 +1359,9 @@
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
resize() {
|
resize() {
|
||||||
|
if (!this.children.length) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
let left = Number.MAX_SAFE_INTEGER;
|
let left = Number.MAX_SAFE_INTEGER;
|
||||||
let right = Number.MIN_SAFE_INTEGER;
|
let right = Number.MIN_SAFE_INTEGER;
|
||||||
let top = Number.MAX_SAFE_INTEGER;
|
let top = Number.MAX_SAFE_INTEGER;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"build": "tsc -b",
|
"build": "tsc -b",
|
||||||
"watch": "tsc -w",
|
"watch": "tsc -w",
|
||||||
"rollup": "rollup -c",
|
"rollup": "rollup -c",
|
||||||
"test": "ts-node src/index.ts --force-img --input ./test/scale-demo.psd --project-assets ./out/ --cache ./cache/cache.json --output ./out/",
|
"test": "ts-node src/index.ts --engine-version v342 --force-img --input ./test/blank.psd --project-assets ./out/ --cache ./cache/cache.json --output ./out/",
|
||||||
"help": "node dist/index.js --h",
|
"help": "node dist/index.js --h",
|
||||||
"test-init": "node dist/index.js --init --project-assets ./out/ --cache E:\\Git\\ccc-framework-3d\\tools\\psd2ui\\cache\\cache.json",
|
"test-init": "node dist/index.js --init --project-assets ./out/ --cache E:\\Git\\ccc-framework-3d\\tools\\psd2ui\\cache\\cache.json",
|
||||||
"test-png9": "ts-node src/index.ts --engine-version v342 --pinyin --input ./test/png9.psd --output ./out/",
|
"test-png9": "ts-node src/index.ts --engine-version v342 --pinyin --input ./test/png9.psd --output ./out/",
|
||||||
|
@ -24,6 +24,9 @@ export class PsdGroup extends PsdLayer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
resize() {
|
resize() {
|
||||||
|
if(!this.children.length){
|
||||||
|
return;
|
||||||
|
}
|
||||||
let left = Number.MAX_SAFE_INTEGER;
|
let left = Number.MAX_SAFE_INTEGER;
|
||||||
let right = Number.MIN_SAFE_INTEGER;
|
let right = Number.MIN_SAFE_INTEGER;
|
||||||
let top = Number.MAX_SAFE_INTEGER;
|
let top = Number.MAX_SAFE_INTEGER;
|
||||||
|
Loading…
Reference in New Issue
Block a user