Skip to content

Commit f15124c

Browse files
movedoastasson
authored andcommitted
Whoops, wrong indentation
1 parent 25184b7 commit f15124c

File tree

1 file changed

+40
-40
lines changed

1 file changed

+40
-40
lines changed

src/ResizeSensor.js

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,9 @@
8383
* @constructor
8484
*/
8585
var ResizeSensor = function(element, callback) {
86-
86+
8787
var observer;
88-
88+
8989
/**
9090
*
9191
* @constructor
@@ -161,44 +161,44 @@
161161
var lastWidth = size.width;
162162
var lastHeight = size.height;
163163
var initialHiddenCheck = true, resetRAF_id;
164-
165-
164+
165+
166166
var resetExpandShrink_ = function () {
167-
expandChild.style.width = '100000px';
168-
expandChild.style.height = '100000px';
169-
170-
expand.scrollLeft = 100000;
171-
expand.scrollTop = 100000;
172-
173-
shrink.scrollLeft = 100000;
174-
shrink.scrollTop = 100000;
175-
};
167+
expandChild.style.width = '100000px';
168+
expandChild.style.height = '100000px';
169+
170+
expand.scrollLeft = 100000;
171+
expand.scrollTop = 100000;
172+
173+
shrink.scrollLeft = 100000;
174+
shrink.scrollTop = 100000;
175+
};
176176
var reset = function() {
177-
// Check if element is hidden
178-
if (initialHiddenCheck){
179-
if (!expand.scrollTop && !expand.scrollLeft) {
180-
181-
// reset
182-
resetExpandShrink_();
183-
184-
// Check in next frame
185-
if (!resetRAF_id){
186-
resetRAF_id = requestAnimationFrame(function(){
187-
resetRAF_id = 0;
188-
189-
reset();
190-
});
191-
}
192-
193-
return;
194-
}
195-
// Stop checking
196-
else{
197-
initialHiddenCheck = false;
198-
}
199-
}
200-
201-
resetExpandShrink_();
177+
// Check if element is hidden
178+
if (initialHiddenCheck){
179+
if (!expand.scrollTop && !expand.scrollLeft) {
180+
181+
// reset
182+
resetExpandShrink_();
183+
184+
// Check in next frame
185+
if (!resetRAF_id){
186+
resetRAF_id = requestAnimationFrame(function(){
187+
resetRAF_id = 0;
188+
189+
reset();
190+
});
191+
}
192+
193+
return;
194+
}
195+
// Stop checking
196+
else{
197+
initialHiddenCheck = false;
198+
}
199+
}
200+
201+
resetExpandShrink_();
202202
};
203203
element.resizeSensor.resetSensor = reset;
204204

@@ -240,11 +240,11 @@
240240

241241
addEvent(expand, 'scroll', onScroll);
242242
addEvent(shrink, 'scroll', onScroll);
243-
243+
244244
// Fix for custom Elements
245245
requestAnimationFrame(reset);
246246
}
247-
247+
248248
if (typeof ResizeObserver != "undefined") {
249249
observer = new ResizeObserver(function(element){
250250
forEachElement(element, function (elem) {

0 commit comments

Comments
 (0)