Commit 9126cc2e authored by 任建锋's avatar 任建锋

--

parent 81d83998
......@@ -60,9 +60,9 @@ async function walkNode(node, callback, includeSelf = false) {
}
/**
* Created by rockyl on 2019-09-26.
* Created by renjianfeng on 2020-06-11.
*
* 导出zeroing的视图
* 导出spark的视图
*/
const relativePosPrefixMap = {
......@@ -193,14 +193,17 @@ async function execute(psdFile, options) {
};
let dealLater = true;
if (x !== 0) {
properties.style.left = x - (isSecondLayer ? offset.x : 0);
if(!properties.style.left){
properties.style.left = x - (isSecondLayer ? offset.x : 0);
}
}
if (y !== 0) {
properties.style.top = y - (isSecondLayer ? offset.y : 0);
if(!properties.style.top){
properties.style.top = y - (isSecondLayer ? offset.y : 0);
}
}
properties.style.position="absolute";
viewNode.rect={
x: properties.style.left?properties.style.left:0,
y: properties.style.top?properties.style.top:0,
......
This diff is collapsed.
......@@ -66,9 +66,9 @@ async function walkNode(node, callback, includeSelf = false) {
}
/**
* Created by rockyl on 2019-09-26.
* Created by renjianfeng on 2020-06-11.
*
* 导出zeroing的视图
* 导出spark的视图
*/
const relativePosPrefixMap = {
......@@ -199,14 +199,17 @@ async function execute(psdFile, options) {
};
let dealLater = true;
if (x !== 0) {
properties.style.left = x - (isSecondLayer ? offset.x : 0);
if(!properties.style.left){
properties.style.left = x - (isSecondLayer ? offset.x : 0);
}
}
if (y !== 0) {
properties.style.top = y - (isSecondLayer ? offset.y : 0);
if(!properties.style.top){
properties.style.top = y - (isSecondLayer ? offset.y : 0);
}
}
properties.style.position="absolute";
viewNode.rect={
x: properties.style.left?properties.style.left:0,
y: properties.style.top?properties.style.top:0,
......
This diff is collapsed.
......@@ -66,9 +66,9 @@
}
/**
* Created by rockyl on 2019-09-26.
* Created by renjianfeng on 2020-06-11.
*
* 导出zeroing的视图
* 导出spark的视图
*/
const relativePosPrefixMap = {
......@@ -199,14 +199,17 @@
};
let dealLater = true;
if (x !== 0) {
properties.style.left = x - (isSecondLayer ? offset.x : 0);
if(!properties.style.left){
properties.style.left = x - (isSecondLayer ? offset.x : 0);
}
}
if (y !== 0) {
properties.style.top = y - (isSecondLayer ? offset.y : 0);
if(!properties.style.top){
properties.style.top = y - (isSecondLayer ? offset.y : 0);
}
}
properties.style.position="absolute";
viewNode.rect={
x: properties.style.left?properties.style.left:0,
y: properties.style.top?properties.style.top:0,
......
This diff is collapsed.
......@@ -140,14 +140,17 @@ export async function execute(psdFile, options) {
};
let dealLater = true;
if (x !== 0) {
properties.style.left = x - (isSecondLayer ? offset.x : 0);
if(!properties.style.left){
properties.style.left = x - (isSecondLayer ? offset.x : 0);
}
}
if (y !== 0) {
properties.style.top = y - (isSecondLayer ? offset.y : 0);
if(!properties.style.top){
properties.style.top = y - (isSecondLayer ? offset.y : 0);
}
}
properties.style.position="absolute"
viewNode.rect={
x: properties.style.left?properties.style.left:0,
y: properties.style.top?properties.style.top:0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment