@@ -32,12 +32,12 @@ export default function resize(e, el, container, coor, ratio) {
32
32
CSSObj . width = ( coor . w + resetX - coor . x ) ;
33
33
CSSObj . height = elOffsetWidth * ratioRemainder ;
34
34
if ( dotBoxW > dotBoxH ) {
35
- if ( elOffsetWidth >= dotBoxH ) {
35
+ if ( elOffsetWidth > dotBoxH ) {
36
36
CSSObj . height = dotBoxH ;
37
37
CSSObj . width = dotBoxH * ratio ;
38
38
}
39
39
} else if ( dotBoxW < dotBoxH ) {
40
- if ( elOffsetWidth >= dotBoxW ) {
40
+ if ( elOffsetWidth > dotBoxW ) {
41
41
CSSObj . width = dotBoxW ;
42
42
CSSObj . height = dotBoxW * ratioRemainder ;
43
43
}
@@ -50,16 +50,16 @@ export default function resize(e, el, container, coor, ratio) {
50
50
CSSObj . width = parseInt ( el . style . height ) * ratio ;
51
51
// 限制拖拉的范围在图片内
52
52
if ( dotBoxW > dotBoxH ) {
53
- if ( elOffsetHeight >= dotBoxH ) {
53
+ if ( elOffsetHeight > dotBoxH ) {
54
54
CSSObj . height = dotBoxH ;
55
55
CSSObj . width = dotBoxH * ratio ;
56
56
}
57
57
} else if ( dotBoxW < dotBoxH ) {
58
- if ( elOffsetWidth >= dotBoxW ) {
58
+ if ( elOffsetWidth > dotBoxW ) {
59
59
CSSObj . width = dotBoxW ;
60
60
CSSObj . height = dotBoxW * ratioRemainder ;
61
61
}
62
- } else if ( elOffsetWidth >= dotBoxW ) {
62
+ } else if ( elOffsetWidth > dotBoxW ) {
63
63
CSSObj . width = dotBoxW ;
64
64
CSSObj . height = dotBoxW * ratioRemainder ;
65
65
}
@@ -71,16 +71,16 @@ export default function resize(e, el, container, coor, ratio) {
71
71
CSSObj . height = el . style . width ;
72
72
// limit the crop box area
73
73
if ( dotBoxW > dotBoxH ) {
74
- if ( elOffsetHeight >= dotBoxH ) {
74
+ if ( elOffsetHeight > dotBoxH ) {
75
75
CSSObj . height = dotBoxH ;
76
76
CSSObj . width = dotBoxH ;
77
77
}
78
78
} else if ( dotBoxW < dotBoxH ) {
79
- if ( elOffsetWidth >= dotBoxW ) {
79
+ if ( elOffsetWidth > dotBoxW ) {
80
80
CSSObj . width = dotBoxW ;
81
81
CSSObj . height = dotBoxW ;
82
82
}
83
- } else if ( elOffsetWidth >= dotBoxW ) {
83
+ } else if ( elOffsetWidth > dotBoxW ) {
84
84
CSSObj . width = el . style . height = dotBoxW ;
85
85
}
86
86
}
0 commit comments