@@ -69,6 +69,7 @@ function dragElement(elmnt) {
69
69
pos3 = 0 ,
70
70
pos4 = 0 ;
71
71
let windowHeader = elmnt . querySelector ( ".header" ) ;
72
+ let transition = elmnt . style . transition ;
72
73
73
74
if ( windowHeader ) {
74
75
windowHeader . onmousedown = dragMouseDown ;
@@ -88,6 +89,7 @@ function dragElement(elmnt) {
88
89
startPos = e . clientX || window . event . clientX ;
89
90
90
91
elmnt . style . willChange = "top, left" ;
92
+ elmnt . style . transition = "none" ;
91
93
92
94
document . onmousemove = mouseElementDrag ;
93
95
document . onmouseup = mouseCloseDragElement ;
@@ -100,6 +102,7 @@ function dragElement(elmnt) {
100
102
startPos = e . clientX || window . event . clientX ;
101
103
102
104
elmnt . style . willChange = "top, left" ;
105
+ elmnt . style . transition = "none" ;
103
106
104
107
document . ontouchmove = touchElementDrag ;
105
108
document . ontouchend = touchCloseDragElement ;
@@ -133,6 +136,7 @@ function dragElement(elmnt) {
133
136
endPos = e . clientX || window . event . clientX ;
134
137
135
138
elmnt . style . willChange = "auto" ;
139
+ elmnt . style . transition = transition ;
136
140
137
141
document . onmouseup = null ;
138
142
document . onmousemove = null ;
@@ -142,6 +146,7 @@ function dragElement(elmnt) {
142
146
endPos = e . clientX || window . event . clientX ;
143
147
144
148
elmnt . style . willChange = "auto" ;
149
+ elmnt . style . transition = transition ;
145
150
146
151
document . ontouchend = null ;
147
152
document . ontouchmove = null ;
@@ -155,6 +160,7 @@ function resizeElement(elmnt) {
155
160
pos4 = 0 ;
156
161
157
162
let resizer = elmnt . querySelector ( ".resizer" ) ;
163
+ let transition = elmnt . style . transition ;
158
164
159
165
if ( resizer ) {
160
166
resizer . onmousedown = dragMouseDown ;
@@ -170,6 +176,8 @@ function resizeElement(elmnt) {
170
176
pos3 = e . clientX ;
171
177
pos4 = e . clientY ;
172
178
179
+ elmnt . style . transition = "none" ;
180
+
173
181
startPos = e . clientX || window . event . clientX ;
174
182
175
183
document . onmousemove = mouseElementDrag ;
@@ -180,6 +188,8 @@ function resizeElement(elmnt) {
180
188
pos3 = e . touches [ 0 ] . clientX ;
181
189
pos4 = e . touches [ 0 ] . clientY ;
182
190
191
+ elmnt . style . transition = "none" ;
192
+
183
193
startPos = e . clientX || window . event . clientX ;
184
194
185
195
document . ontouchmove = touchElementDrag ;
@@ -232,13 +242,17 @@ function resizeElement(elmnt) {
232
242
233
243
document . onmouseup = null ;
234
244
document . onmousemove = null ;
245
+
246
+ elmnt . style . transition = transition ;
235
247
}
236
248
237
249
function touchCloseDragElement ( e ) {
238
250
endPos = e . clientX || window . event . clientX ;
239
251
240
252
document . ontouchend = null ;
241
253
document . ontouchmove = null ;
254
+
255
+ elmnt . style . transition = transition ;
242
256
}
243
257
}
244
258
0 commit comments