Code Format
parent
ff5b2f7fe6
commit
8c54e80fb2
|
@ -323,7 +323,7 @@ export default {
|
|||
let leftPos = offset.left + deltaX;
|
||||
let topPos = offset.top + deltaY;
|
||||
let viewport = DomHandler.getViewport();
|
||||
let getComputedStyle = getComputedStyle(this.container)
|
||||
let getComputedStyle = getComputedStyle(this.container);
|
||||
let marginLeft = parseFloat(getComputedStyle.marginLeft);
|
||||
let marginTop = parseFloat(getComputedStyle.marginTop);
|
||||
|
||||
|
@ -332,18 +332,18 @@ export default {
|
|||
if (this.keepInViewport) {
|
||||
if (leftPos >= this.minX && leftPos + width < viewport.width) {
|
||||
this.lastPageX = event.pageX;
|
||||
this.container.style.left = (leftPos - marginLeft) + 'px';
|
||||
this.container.style.left = leftPos - marginLeft + 'px';
|
||||
}
|
||||
|
||||
if (topPos >= this.minY && topPos + height < viewport.height) {
|
||||
this.lastPageY = event.pageY;
|
||||
this.container.style.top = (topPos - marginTop) + 'px';
|
||||
this.container.style.top = topPos - marginTop + 'px';
|
||||
}
|
||||
} else {
|
||||
this.lastPageX = event.pageX;
|
||||
this.container.style.left = (leftPos - marginLeft) + 'px';
|
||||
this.container.style.left = leftPos - marginLeft + 'px';
|
||||
this.lastPageY = event.pageY;
|
||||
this.container.style.top = (topPos - marginTop) + 'px';
|
||||
this.container.style.top = topPos - marginTop + 'px';
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -373,7 +373,7 @@ export default {
|
|||
window.document.removeEventListener('mouseup', this.documentDragEndListener);
|
||||
this.documentDragEndListener = null;
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
maximizeIconComponent() {
|
||||
|
|
Loading…
Reference in New Issue