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

--

parent dd6e52a5
...@@ -169,8 +169,8 @@ ...@@ -169,8 +169,8 @@
y:parseInt(node.y), y:parseInt(node.y),
anchorX:parseInt(node.anchorX), anchorX:parseInt(node.anchorX),
anchorY:parseInt(node.anchorY), anchorY:parseInt(node.anchorY),
scaleX:parseInt(node.anchorX), scaleX:parseInt(node.scaleX),
scaleY:parseInt(node.anchorY), scaleY:parseInt(node.scaleY),
// imageWidth:parseInt(node.imageWidth), // imageWidth:parseInt(node.imageWidth),
// imageHeight:parseInt(node.imageHeight), // imageHeight:parseInt(node.imageHeight),
width:parseInt(node._width), width:parseInt(node._width),
......
...@@ -95,6 +95,7 @@ ...@@ -95,6 +95,7 @@
let view = this.getNode('', true); let view = this.getNode('', true);
return node.getIndexPath(view); return node.getIndexPath(view);
}, },
} }
} }
</script> </script>
......
...@@ -311,10 +311,11 @@ export default { ...@@ -311,10 +311,11 @@ export default {
this.styleCatch={ this.styleCatch={
x:this.targetNode.x, x:this.targetNode.x,
y:this.targetNode.y, y:this.targetNode.y,
worldVisible:this.targetNode.worldVisible,
anchorX:this.targetNode.anchorX, anchorX:this.targetNode.anchorX,
anchorY:this.targetNode.anchorY, anchorY:this.targetNode.anchorY,
imageWidth:this.targetNode.imageWidth, textureWidth:this.targetNode.textureWidth,
imageHeight:this.targetNode.imageHeight, textureHeight:this.targetNode.textureHeight,
worldMatrix:this.targetNode.worldMatrix, worldMatrix:this.targetNode.worldMatrix,
width:this.targetNode.width, width:this.targetNode.width,
height:this.targetNode.height, height:this.targetNode.height,
...@@ -356,15 +357,16 @@ export default { ...@@ -356,15 +357,16 @@ export default {
} }
let result={ let result={
width: `${ (this.styleCatch.imageWidth?this.styleCatch.imageWidth:(this.styleCatch.width?this.styleCatch.width:0))*scaleX/window.devicePixelRatio}px`, width: `${ (this.styleCatch.textureWidth?this.styleCatch.textureWidth:(this.styleCatch._width?this.styleCatch._width:(this.styleCatch.width?this.styleCatch.width:0)))*scaleX/window.devicePixelRatio}px`,
height: `${ (this.styleCatch.imageHeight?this.styleCatch.imageHeight:(this.styleCatch.height?this.styleCatch.height:0))*scaleY/window.devicePixelRatio}px`, height: `${ (this.styleCatch.textureHeight?this.styleCatch.textureHeight:(this.styleCatch._height?this.styleCatch._height:(this.styleCatch.height?this.styleCatch.height:0)))*scaleY/window.devicePixelRatio}px`,
marginTop:`${y/window.devicePixelRatio}px`, marginTop:`${y/window.devicePixelRatio}px`,
marginLeft:`${x/window.devicePixelRatio}px`, marginLeft:`${x/window.devicePixelRatio}px`,
transform: `rotate(${rotation}deg)`, transform: `rotate(${rotation}deg)`,
// webkitTransformOriginY: `${ this.styleCatch.anchorY?this.styleCatch.anchorY:0}px`, // webkitTransformOriginY: `${ this.styleCatch.anchorY?this.styleCatch.anchorY:0}px`,
// webkitTransformOriginX: `${ this.styleCatch.anchorX?this.styleCatch.anchorX:0}px`, // webkitTransformOriginX: `${ this.styleCatch.anchorX?this.styleCatch.anchorX:0}px`,
webkitTransformOrigin:`0px 0px 0px`, webkitTransformOrigin:`0px 0px 0px`,
opacity:`${this.canFouce?"1":"0"}` opacity:`${this.canFouce?"1":"0"}`,
display:`${this.styleCatch.worldVisible?"block":"none"}`
// transform: `matrix(${this.styleCatch.worldMatrix.a},${this.styleCatch.worldMatrix.b},${this.styleCatch.worldMatrix.c},${this.styleCatch.worldMatrix.d},${this.styleCatch.worldMatrix.tx},${this.styleCatch.worldMatrix.ty})` // transform: `matrix(${this.styleCatch.worldMatrix.a},${this.styleCatch.worldMatrix.b},${this.styleCatch.worldMatrix.c},${this.styleCatch.worldMatrix.d},${this.styleCatch.worldMatrix.tx},${this.styleCatch.worldMatrix.ty})`
} }
...@@ -410,18 +412,21 @@ export default { ...@@ -410,18 +412,21 @@ export default {
}, },
targetNode:function(){ targetNode:function(){
console.log("targetNode变化",this.targetNode) console.log("targetNode变化",this.targetNode)
// console.log(this.targetNode.getLocalBounds())
if(!this.targetNode){ if(!this.targetNode){
return return
} }
let { let {
x, x,
y, y,
worldVisible,
anchorX, anchorX,
anchorY, anchorY,
width, width,
height, height,
imageWidth, textureWidth,
imageHeight, textureHeight,
left, left,
top, top,
right, right,
...@@ -449,8 +454,8 @@ export default { ...@@ -449,8 +454,8 @@ export default {
anchorY, anchorY,
width, width,
height, height,
imageWidth, textureWidth,
imageHeight, textureHeight,
left, left,
top, top,
right, right,
...@@ -461,6 +466,7 @@ export default { ...@@ -461,6 +466,7 @@ export default {
instanceType, instanceType,
verticalCenter, verticalCenter,
source, source,
worldVisible,
_width, _width,
_height, _height,
} }
......
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