Commit fb98a2e4 authored by 任建锋's avatar 任建锋

添加锚点

parent 553b3b74
...@@ -203,7 +203,7 @@ async function execute(psdFile, options) { ...@@ -203,7 +203,7 @@ async function execute(psdFile, options) {
value = 0; value = 0;
} }
} }
//console.log(properties); console.log(properties);
properties.style[field] = value; properties.style[field] = value;
} }
} }
...@@ -220,7 +220,7 @@ async function execute(psdFile, options) { ...@@ -220,7 +220,7 @@ async function execute(psdFile, options) {
}; };
let dealLater = true; let dealLater = true;
if (x !== 0) { if (x !== 0) {
//console.log(properties); console.log(properties);
if(!properties.style.left){ if(!properties.style.left){
properties.style.left = x - (isSecondLayer ? offset.x : 0); properties.style.left = x - (isSecondLayer ? offset.x : 0);
} }
...@@ -232,6 +232,7 @@ async function execute(psdFile, options) { ...@@ -232,6 +232,7 @@ async function execute(psdFile, options) {
} }
} }
properties.style.position="absolute"; properties.style.position="absolute";
properties.style.transformOrigin="0px 0px 0px";
viewNode.rect={ viewNode.rect={
x: properties.style.left?properties.style.left:0, x: properties.style.left?properties.style.left:0,
y: properties.style.top?properties.style.top:0, y: properties.style.top?properties.style.top:0,
......
This diff is collapsed.
...@@ -238,6 +238,7 @@ async function execute(psdFile, options) { ...@@ -238,6 +238,7 @@ async function execute(psdFile, options) {
} }
} }
properties.style.position="absolute"; properties.style.position="absolute";
properties.style.transformOrigin="0px 0px 0px";
viewNode.rect={ viewNode.rect={
x: properties.style.left?properties.style.left:0, x: properties.style.left?properties.style.left:0,
y: properties.style.top?properties.style.top:0, y: properties.style.top?properties.style.top:0,
......
This diff is collapsed.
...@@ -238,6 +238,7 @@ ...@@ -238,6 +238,7 @@
} }
} }
properties.style.position="absolute"; properties.style.position="absolute";
properties.style.transformOrigin="0px 0px 0px";
viewNode.rect={ viewNode.rect={
x: properties.style.left?properties.style.left:0, x: properties.style.left?properties.style.left:0,
y: properties.style.top?properties.style.top:0, y: properties.style.top?properties.style.top:0,
......
This diff is collapsed.
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