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

--

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