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

--

parent 0276125a
......@@ -122,6 +122,7 @@
},
onClickTouchLayer(e){
const {x,y} = e;
console.log(e)
if(!this.autoSelectState){
return false;
}
......
......@@ -72,8 +72,8 @@ export default {
// console.log(e.pageX,this.$refs.zeroPlayground.getBoundingClientRect())
// console.log(e.pageX-(this.$refs.zeroPlayground.getBoundingClientRect().left/this.zoom))
events.$emit("onClickTouchLayer",{
x:e.pageX-this.$refs.zeroPlayground.getBoundingClientRect().left/this.zoom,
y:e.pageY-this.$refs.zeroPlayground.getBoundingClientRect().top/this.zoom
x:(e.pageX-this.$refs.zeroPlayground.getBoundingClientRect().left/this.zoom)*window.devicePixelRatio,
y:(e.pageY-this.$refs.zeroPlayground.getBoundingClientRect().top/this.zoom)*window.devicePixelRatio
});
},
matrixToGroup(matrix) {
......@@ -124,14 +124,14 @@ export default {
if (!this.canMove) {
return;
}
this.changeMoveX = e.x - this.changeWidthStart;
this.changeMoveY = e.y - this.changeHeightStart;
this.changeMoveX = (e.x - this.changeWidthStart)*window.devicePixelRatio;
this.changeMoveY = (e.y - this.changeHeightStart)*window.devicePixelRatio;
// this.changeMoveOffsetX=e.offsetX
// this.changeMoveOffsetY=e.offsetY
this.changeMoveOffsetX1=e.x;
this.changeMoveOffsetY1=e.y;
this.changeMoveOffsetX=this.changeMoveOffsetX1-this.changeMoveOffsetX2
this.changeMoveOffsetY=this.changeMoveOffsetY1-this.changeMoveOffsetY2
this.changeMoveOffsetX=(this.changeMoveOffsetX1-this.changeMoveOffsetX2)*window.devicePixelRatio
this.changeMoveOffsetY=(this.changeMoveOffsetY1-this.changeMoveOffsetY2)*window.devicePixelRatio
//console.log( "this.changeMoveOffsetX",)
this.changeMoveOffsetX2=e.x;
this.changeMoveOffsetY2=e.y;
......@@ -356,10 +356,10 @@ export default {
}
let result={
width: `${ (this.styleCatch.imageWidth?this.styleCatch.imageWidth:(this.styleCatch.width?this.styleCatch.width:0))*scaleX}px`,
height: `${ (this.styleCatch.imageHeight?this.styleCatch.imageHeight:(this.styleCatch.height?this.styleCatch.height:0))*scaleY}px`,
marginTop:`${y}px`,
marginLeft:`${x}px`,
width: `${ (this.styleCatch.imageWidth?this.styleCatch.imageWidth:(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`,
marginTop:`${y/window.devicePixelRatio}px`,
marginLeft:`${x/window.devicePixelRatio}px`,
transform: `rotate(${rotation}deg)`,
// webkitTransformOriginY: `${ this.styleCatch.anchorY?this.styleCatch.anchorY:0}px`,
// webkitTransformOriginX: `${ this.styleCatch.anchorX?this.styleCatch.anchorX:0}px`,
......
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