Browse Source
Merge pull request #528 from jktu2870/bugs
Dashboard page jittering
pull/543/head
Igor Kulikov
9 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
3 additions and
1 deletions
-
ui/src/app/common/utils.service.js
|
|
|
@ -553,7 +553,9 @@ function Utils($mdColorPalette, $rootScope, $window, $translate, $q, $timeout, t |
|
|
|
var aspect = imageAspectMap[urlHashCode]; |
|
|
|
if (angular.isUndefined(aspect)) { |
|
|
|
var testImage = document.createElement('img'); // eslint-disable-line
|
|
|
|
testImage.style.visibility = 'hidden'; |
|
|
|
testImage.style.position = 'absolute'; |
|
|
|
testImage.style.left = '-99999px'; |
|
|
|
testImage.style.top = '-99999px'; |
|
|
|
testImage.onload = function() { |
|
|
|
aspect = testImage.width / testImage.height; |
|
|
|
document.body.removeChild(testImage); //eslint-disable-line
|
|
|
|
|