|
@@ -91,22 +91,22 @@ export default defineComponent({
|
|
|
) - RectInfo.height;
|
|
|
|
|
|
if (left < 0) {
|
|
|
- left = 0;
|
|
|
+ left = 2;
|
|
|
}
|
|
|
if (top < 0) {
|
|
|
- top = 0;
|
|
|
+ top = 2;
|
|
|
}
|
|
|
if (right < 0) {
|
|
|
- right = 0;
|
|
|
+ right = 2;
|
|
|
}
|
|
|
if (bottom < 0) {
|
|
|
- bottom = 0;
|
|
|
+ bottom = 2;
|
|
|
}
|
|
|
- if (left > mainWidth) {
|
|
|
- left = mainWidth;
|
|
|
+ if (left > mainWidth - 2) {
|
|
|
+ left = mainWidth - 2;
|
|
|
}
|
|
|
- if (top > mainHeight) {
|
|
|
- top = mainHeight;
|
|
|
+ if (top > mainHeight - 2) {
|
|
|
+ top = mainHeight - 2;
|
|
|
}
|
|
|
|
|
|
target!.style.left = `${left}px`;
|