Commit 9c63bf5d authored by rockyl's avatar rockyl

修复

parent d23e5789
...@@ -18,6 +18,12 @@ const absValueMapping = { ...@@ -18,6 +18,12 @@ const absValueMapping = {
width: 'a', width: 'a',
height: 'd', height: 'd',
}; };
const absSelfValueMapping = {
x: 'X',
y: 'Y',
width: 'X',
height: 'Y',
};
/** /**
* 编辑器舞台 * 编辑器舞台
...@@ -88,7 +94,7 @@ export class EditorStage extends Node { ...@@ -88,7 +94,7 @@ export class EditorStage extends Node {
node[key] = v; node[key] = v;
} else { } else {
key = key.replace(offsetPrefix, ''); key = key.replace(offsetPrefix, '');
let offsetV = v / node.worldMatrix[absValueMapping[key]]; let offsetV = v / node.worldMatrix[absValueMapping[key]] * node['scale' + absSelfValueMapping[key]];
node[key] += offsetV; node[key] += offsetV;
console.log('modifyProps:', key, offsetV, node[key]); console.log('modifyProps:', key, offsetV, node[key]);
} }
......
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