调整画布布局
This commit is contained in:
@@ -7,6 +7,7 @@ const getMousePosition = (e,bor,dom) => {
|
||||
offsetY: touch.clientY - e.target.getBoundingClientRect().top,
|
||||
clientX:touch.clientX,
|
||||
clientY:touch.clientY,
|
||||
target:e.target,
|
||||
}
|
||||
if(dom){
|
||||
event.offsetX = touch.clientX - dom.getBoundingClientRect().left
|
||||
@@ -18,6 +19,7 @@ const getMousePosition = (e,bor,dom) => {
|
||||
offsetY:e.offsetY,
|
||||
clientX:e.clientX,
|
||||
clientY:e.clientY,
|
||||
target:e.target,
|
||||
}
|
||||
}
|
||||
return event
|
||||
|
||||
@@ -451,8 +451,6 @@ function segmentImage(markerImage,fullImage,size){
|
||||
marker.onload = () => {
|
||||
ctx1.drawImage(marker,0,0 ,size.width, size.height);
|
||||
full.onload = () => {
|
||||
console.log(full.height,size,full.width);
|
||||
|
||||
ctx2.drawImage(full,0,0, size.width, size.height);
|
||||
segmentImageItem();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user